feat: rate limiter (#4011)

This commit is contained in:
DarkSky
2023-08-31 20:29:25 +08:00
committed by GitHub
parent 8e48255ef8
commit 4ef1425299
15 changed files with 184 additions and 12 deletions

View File

@@ -43,13 +43,14 @@ async function currentUser(app: INestApplication, token: string) {
query: `
query {
currentUser {
id, name, email, emailVerified, avatarUrl, createdAt, hasPassword
id, name, email, emailVerified, avatarUrl, createdAt, hasPassword,
token { token }
}
}
`,
})
.expect(200);
return res.body?.data?.currentUser;
return res.body.data.currentUser;
}
async function createWorkspace(
@@ -440,7 +441,7 @@ async function getInviteInfo(
`,
})
.expect(200);
return res.body.data.workspace;
return res.body.data.getInviteInfo;
}
export {