mirror of
https://github.com/Discreetly/server.git
synced 2026-01-09 12:37:58 -05:00
feat(router) adding jubmoji router
This commit is contained in:
@@ -42,7 +42,7 @@ model GateWayIdentity {
|
|||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
semaphoreIdentity String @unique
|
semaphoreIdentity String @unique
|
||||||
discordId String?
|
discordId String?
|
||||||
jubmojii String[]
|
jubmoji String[]
|
||||||
steamId64 String?
|
steamId64 String?
|
||||||
roomIds String[] @default([]) @db.ObjectId
|
roomIds String[] @default([]) @db.ObjectId
|
||||||
rooms Rooms[] @relation(fields: [roomIds], references: [id])
|
rooms Rooms[] @relation(fields: [roomIds], references: [id])
|
||||||
|
|||||||
@@ -153,3 +153,13 @@ export async function findRoomWithMessageId(
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function findAllJubmojiNullifiers() {
|
||||||
|
const jubmojiNullifiers = await prisma.gateWayIdentity.findMany({
|
||||||
|
select: {
|
||||||
|
jubmoji: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return jubmojiNullifiers;
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import codeRouter from './gateways/inviteCode';
|
|||||||
import roomRouter from './rooms/rooms';
|
import roomRouter from './rooms/rooms';
|
||||||
import identityRouter from './identity/idc';
|
import identityRouter from './identity/idc';
|
||||||
import adminRouter from './admin/admin';
|
import adminRouter from './admin/admin';
|
||||||
|
import jubmojiRouter from './gateways/jubmojis';
|
||||||
|
|
||||||
export function initEndpoints(app: Express) {
|
export function initEndpoints(app: Express) {
|
||||||
// This code is used to fetch the server info from the api
|
// This code is used to fetch the server info from the api
|
||||||
@@ -17,6 +18,7 @@ export function initEndpoints(app: Express) {
|
|||||||
app.use('/gateway/eth', ethRouter);
|
app.use('/gateway/eth', ethRouter);
|
||||||
app.use('/gateway/theword', theWordRouter);
|
app.use('/gateway/theword', theWordRouter);
|
||||||
app.use('/gateway/code', codeRouter);
|
app.use('/gateway/code', codeRouter);
|
||||||
|
app.use('/gateway/jubmojis', jubmojiRouter)
|
||||||
app.use('/room', roomRouter);
|
app.use('/room', roomRouter);
|
||||||
app.use('/identity', identityRouter);
|
app.use('/identity', identityRouter);
|
||||||
app.use('/admin', adminRouter);
|
app.use('/admin', adminRouter);
|
||||||
|
|||||||
Reference in New Issue
Block a user