tangled
alpha
login
or
join now
rocksky.app
/
rocksky
96
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
96
fork
atom
overview
issues
7
pulls
pipelines
Allow lookup by DID or handle
tsiry-sandratraina.com
1 month ago
0605cd2c
4a48a6b1
+2
-2
1 changed file
expand all
collapse all
unified
split
apps
api
src
opengraph
app.ts
+2
-2
apps/api/src/opengraph/app.ts
···
5
5
import artists, { SelectArtist } from "schema/artists";
6
6
import tracks, { SelectTrack } from "schema/tracks";
7
7
import scrobbles from "schema/scrobbles";
8
8
-
import { eq } from "drizzle-orm";
8
8
+
import { eq, or } from "drizzle-orm";
9
9
10
10
const app = new Hono();
11
11
···
22
22
const user = await ctx.db
23
23
.select()
24
24
.from(users)
25
25
-
.where(eq(users.handle, handle))
25
25
+
.where(or(eq(users.handle, handle), eq(users.did, handle)))
26
26
.limit(1)
27
27
.execute()
28
28
.then(([row]) => row);