tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
Annotate xrpc handler params with QueryParams
tsiry-sandratraina.com
1 month ago
09db0c5f
bdea5269
+17
-17
17 changed files
expand all
collapse all
unified
split
apps
api
src
xrpc
app
rocksky
album
getAlbum.ts
getAlbumTracks.ts
getAlbums.ts
artist
getArtist.ts
getArtistAlbums.ts
getArtistListeners.ts
getArtistTracks.ts
getArtists.ts
song
getSong.ts
getSongs.ts
spotify
getCurrentlyPlaying.ts
next.ts
pause.ts
play.ts
previous.ts
seek.ts
stats
getStats.ts
+1
-1
apps/api/src/xrpc/app/rocksky/album/getAlbum.ts
···
13
import type { SelectArtist } from "schema/artists";
14
15
export default function (server: Server, ctx: Context) {
16
-
const getAlbum = (params) =>
17
pipe(
18
{ params, ctx },
19
retrieve,
···
13
import type { SelectArtist } from "schema/artists";
14
15
export default function (server: Server, ctx: Context) {
16
+
const getAlbum = (params: QueryParams) =>
17
pipe(
18
{ params, ctx },
19
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/album/getAlbumTracks.ts
···
10
import tables from "schema";
11
12
export default function (server: Server, ctx: Context) {
13
-
const getAlbumTracks = (params) =>
14
pipe(
15
{ params, ctx },
16
retrieve,
···
10
import tables from "schema";
11
12
export default function (server: Server, ctx: Context) {
13
+
const getAlbumTracks = (params: QueryParams) =>
14
pipe(
15
{ params, ctx },
16
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/album/getAlbums.ts
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
-
const getAlbums = (params) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
+
const getAlbums = (params: QueryParams) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/artist/getArtist.ts
···
9
import type { SelectArtist } from "schema/artists";
10
11
export default function (server: Server, ctx: Context) {
12
-
const getArtist = (params) =>
13
pipe(
14
{ params, ctx },
15
retrieve,
···
9
import type { SelectArtist } from "schema/artists";
10
11
export default function (server: Server, ctx: Context) {
12
+
const getArtist = (params: QueryParams) =>
13
pipe(
14
{ params, ctx },
15
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/artist/getArtistAlbums.ts
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
-
const getArtistAlbums = (params) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
+
const getArtistAlbums = (params: QueryParams) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/artist/getArtistListeners.ts
···
6
import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistListeners";
7
8
export default function (server: Server, ctx: Context) {
9
-
const getArtistListeners = (params) =>
10
pipe(
11
{ params, ctx },
12
retrieve,
···
6
import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistListeners";
7
8
export default function (server: Server, ctx: Context) {
9
+
const getArtistListeners = (params: QueryParams) =>
10
pipe(
11
{ params, ctx },
12
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/artist/getArtistTracks.ts
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
-
const getArtistTracks = (params) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
+
const getArtistTracks = (params: QueryParams) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/artist/getArtists.ts
···
9
import { inArray } from "drizzle-orm";
10
11
export default function (server: Server, ctx: Context) {
12
-
const getArtists = (params) =>
13
pipe(
14
{ params, ctx },
15
retrieve,
···
9
import { inArray } from "drizzle-orm";
10
11
export default function (server: Server, ctx: Context) {
12
+
const getArtists = (params: QueryParams) =>
13
pipe(
14
{ params, ctx },
15
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/song/getSong.ts
···
10
import type { SelectArtist } from "schema/artists";
11
12
export default function (server: Server, ctx: Context) {
13
-
const getSong = (params) =>
14
pipe(
15
{ params, ctx },
16
retrieve,
···
10
import type { SelectArtist } from "schema/artists";
11
12
export default function (server: Server, ctx: Context) {
13
+
const getSong = (params: QueryParams) =>
14
pipe(
15
{ params, ctx },
16
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/song/getSongs.ts
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
-
const getSongs = (params) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
···
7
import { deepCamelCaseKeys } from "lib";
8
9
export default function (server: Server, ctx: Context) {
10
+
const getSongs = (params: QueryParams) =>
11
pipe(
12
{ params, ctx },
13
retrieve,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const getCurrentlyPlaying = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const getCurrentlyPlaying = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/next.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const next = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const next = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/pause.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const pause = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const pause = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/play.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const play = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const play = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/previous.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const previous = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const previous = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/spotify/seek.ts
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
-
const seek = (params, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
···
11
import type { SelectUser } from "schema/users";
12
13
export default function (server: Server, ctx: Context) {
14
+
const seek = (params: QueryParams, auth: HandlerAuth) =>
15
pipe(
16
{ params, ctx, did: auth.credentials?.did },
17
withUser,
+1
-1
apps/api/src/xrpc/app/rocksky/stats/getStats.ts
···
6
import { deepCamelCaseKeys } from "lib";
7
8
export default function (server: Server, ctx: Context) {
9
-
const getStats = (params) =>
10
pipe(
11
{ params, ctx },
12
retrieve,
···
6
import { deepCamelCaseKeys } from "lib";
7
8
export default function (server: Server, ctx: Context) {
9
+
const getStats = (params: QueryParams) =>
10
pipe(
11
{ params, ctx },
12
retrieve,