diff --git a/src/controllers/activity.controller.ts b/src/controllers/activity.controller.ts index 887af46..e719c3f 100644 --- a/src/controllers/activity.controller.ts +++ b/src/controllers/activity.controller.ts @@ -40,9 +40,9 @@ export default class ActivityController extends BaseController { if (user.inviteUser) { throw new ZError(11, 'invite user already set') } - if (!user.allTaskFinished()) { - throw new ZError(12, 'not all tasks finished') - } + // if (!user.allTaskFinished()) { + // throw new ZError(12, 'not all tasks finished') + // } // In production, users cannot invite themselves if (process.env.NODE_ENV === 'production' && code === user.inviteCode) { throw new ZError(13, 'cannot invite yourself') diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index db497c5..fd6b2a8 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -109,7 +109,7 @@ class BoxController extends BaseController { const userMap = new Map() users.forEach(u => userMap.set(u.id, u)) for (let i = 0; i < records.length; i++) { - const u = userMap.get(records[i].user) + const u = userMap.get(records[i].chestOwner) const score = records[i].myScore || 0 result.push({ nickname: u?.twitterName || u?.discordName || u?.address ? formatAddress(u.address) : 'unknown',