mirror of
https://github.com/Discreetly/server.git
synced 2026-05-09 03:00:26 -04:00
refactor(create-room) /room/add and createroom include encrypted
This commit is contained in:
@@ -33,7 +33,8 @@ export async function createRoom(
|
||||
bandadaGroupId?: string,
|
||||
bandadaAPIKey?: string,
|
||||
membershipType?: string,
|
||||
roomId?: string
|
||||
roomId?: string,
|
||||
encrypted?: string
|
||||
): Promise<{ roomId: string; claimCodes: { claimcode: string }[] } | undefined | null> {
|
||||
const claimCodes: { claimcode: string }[] = genClaimCodeArray(numClaimCodes);
|
||||
const mockUsers: string[] = genMockUsers(approxNumMockUsers);
|
||||
@@ -62,6 +63,7 @@ export async function createRoom(
|
||||
bandadaAPIKey,
|
||||
type,
|
||||
membershipType,
|
||||
encrypted,
|
||||
claimCodes: {
|
||||
create: claimCodes
|
||||
},
|
||||
|
||||
@@ -134,6 +134,7 @@ router.post('/add', adminAuth, (req, res) => {
|
||||
const bandadaAPIKey = roomMetadata.bandadaAPIKey;
|
||||
const membershipType = roomMetadata.membershipType;
|
||||
const roomId = roomMetadata.roomId;
|
||||
const encrypted = roomMetadata.encrypted as string;
|
||||
createRoom(
|
||||
roomName,
|
||||
rateLimit,
|
||||
@@ -146,7 +147,8 @@ router.post('/add', adminAuth, (req, res) => {
|
||||
bandadaGroupId,
|
||||
bandadaAPIKey,
|
||||
membershipType,
|
||||
roomId
|
||||
roomId,
|
||||
encrypted
|
||||
)
|
||||
.then((result) => {
|
||||
const response =
|
||||
|
||||
@@ -65,6 +65,7 @@ export interface addRoomData {
|
||||
membershipType?: string;
|
||||
roomId?: string;
|
||||
admin?: boolean;
|
||||
encrypted?: string;
|
||||
discordIds?: string[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user