mirror of
https://github.com/Discreetly/server.git
synced 2026-01-08 20:18:08 -05:00
Merge branch 'password-endpoints' of github.com:Discreetly/server into password-endpoints
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -2949,9 +2949,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz",
|
||||
"integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==",
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz",
|
||||
"integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
|
||||
@@ -23,14 +23,14 @@ router.post(
|
||||
'/join',
|
||||
limiter,
|
||||
asyncHandler(async (req: Request, res: Response) => {
|
||||
const { proof, idc } = req.body as { proof: SNARKProof, idc: string };
|
||||
const { proof, idc } = req.body as { proof: SNARKProof; idc: string };
|
||||
const isValid = await verifyTheWordProof(proof);
|
||||
if (isValid) {
|
||||
const room = await prisma.rooms.findUnique({
|
||||
const room = (await prisma.rooms.findUnique({
|
||||
where: {
|
||||
roomId: '007' + process.env.THEWORD_ITERATION
|
||||
roomId: '700' + process.env.THEWORD_ITERATION
|
||||
}
|
||||
}) as RoomI;
|
||||
})) as RoomI;
|
||||
const addedRoom = await addIdentityToIdentityListRooms([room], idc);
|
||||
if (addedRoom.length === 0) {
|
||||
res.status(500).json({
|
||||
|
||||
Reference in New Issue
Block a user