Merge branch 'main' into fixing-code-creation

This commit is contained in:
AtHeartEngineer
2023-08-25 16:49:44 -04:00
committed by GitHub
2 changed files with 11 additions and 6 deletions

View File

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

View File

@@ -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);
}
})