mirror of
https://github.com/Discreetly/frontend.git
synced 2026-01-10 05:18:06 -05:00
invite all rooms
This commit is contained in:
@@ -32,6 +32,11 @@ export async function createInvite(
|
||||
expiresAt?: number,
|
||||
usesLeft?: number
|
||||
) {
|
||||
const data = { numCodes, rooms: roomIds, expiresAt, usesLeft };
|
||||
const data = { numCodes, expiresAt, usesLeft };
|
||||
if (roomIds.length > 0) {
|
||||
data['roomIds'] = roomIds;
|
||||
} else {
|
||||
data['all'] = true;
|
||||
}
|
||||
return postAuth([serverUrl, `api/addcode`], data, username, password) as Promise<Invites>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user