mirror of
https://github.com/Discreetly/server.git
synced 2026-04-17 03:00:55 -04:00
Merge branch 'main' into fixing-code-creation
This commit is contained in:
@@ -358,6 +358,11 @@ export function createSystemMessages(
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export interface BandadaRoom extends RoomI {
|
||||
bandadaAPIKey: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function takes in an identity and a room and removes the identity from the room
|
||||
* by setting its semaphoreIdentities to 0n and identities to 0n
|
||||
@@ -385,6 +390,7 @@ export function removeIdentityFromRoom(
|
||||
limiter == rateCommitmentsToUpdate ? '0' : (limiter as string)
|
||||
) ?? [];
|
||||
|
||||
|
||||
return prisma.rooms
|
||||
.update({
|
||||
where: { id: room.id },
|
||||
|
||||
@@ -63,10 +63,9 @@ export function initEndpoints(app: Express, adminAuth: RequestHandler) {
|
||||
userMessageLimit,
|
||||
membershipType,
|
||||
identities,
|
||||
contractAddress,
|
||||
semaphoreIdentities,
|
||||
bandadaAddress,
|
||||
bandadaGroupId,
|
||||
type
|
||||
bandadaGroupId
|
||||
} = room || {};
|
||||
const id = String(roomId);
|
||||
const roomResult: RoomI = {
|
||||
@@ -81,13 +80,13 @@ export function initEndpoints(app: Express, adminAuth: RequestHandler) {
|
||||
if (membershipType === 'BANDADA_GROUP') {
|
||||
roomResult.bandadaAddress = bandadaAddress;
|
||||
roomResult.bandadaGroupId = bandadaGroupId;
|
||||
roomResult.semaphoreIdentities = semaphoreIdentities;
|
||||
}
|
||||
if (membershipType === 'IDENTITY_LIST') {
|
||||
roomResult.identities = identities;
|
||||
roomResult.semaphoreIdentities = semaphoreIdentities;
|
||||
}
|
||||
if (type === 'CONTRACT') {
|
||||
roomResult.contractAddress = contractAddress;
|
||||
}
|
||||
|
||||
res.status(200).json(roomResult);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user