This commit is contained in:
syuilo
2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View File

@ -43,7 +43,7 @@ if (!['production', 'test'].includes(process.env.NODE_ENV || '')) {
// Delay
if (envOption.slow) {
app.use(slow({
delay: 3000
delay: 3000,
}));
}
}
@ -74,7 +74,7 @@ router.get('/avatar/@:acct', async ctx => {
const user = await Users.findOne({
usernameLower: username.toLowerCase(),
host: host === config.host ? null : host,
isSuspended: false
isSuspended: false,
});
if (user) {
@ -93,7 +93,7 @@ router.get('/random-avatar/:x', async ctx => {
router.get('/verify-email/:code', async ctx => {
const profile = await UserProfiles.findOne({
emailVerifyCode: ctx.params.code
emailVerifyCode: ctx.params.code,
});
if (profile != null) {
@ -102,12 +102,12 @@ router.get('/verify-email/:code', async ctx => {
await UserProfiles.update({ userId: profile.userId }, {
emailVerified: true,
emailVerifyCode: null
emailVerifyCode: null,
});
publishMainStream(profile.userId, 'meUpdated', await Users.pack(profile.userId, { id: profile.userId }, {
detail: true,
includeSecrets: true
includeSecrets: true,
}));
} else {
ctx.status = 404;