refactor(create-room) /room/add and createroom include encrypted

This commit is contained in:
Tanner Shaw
2023-11-11 14:22:11 -06:00
parent ab430d167f
commit a009ced19c
3 changed files with 7 additions and 2 deletions

View File

@@ -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
},

View File

@@ -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 =

View File

@@ -65,6 +65,7 @@ export interface addRoomData {
membershipType?: string;
roomId?: string;
admin?: boolean;
encrypted?: string;
discordIds?: string[];
}