feat: daily reset for syndicate standing #582

Merged
Sainan merged 3 commits from daily-reset into main 2024-12-21 15:44:49 -08:00
Showing only changes of commit 596aea7890 - Show all commits

View File

@ -44,7 +44,7 @@ export const createPersonalRooms = async (accountId: Types.ObjectId, shipId: Typ
await personalRooms.save();
};
export const getAccountIdForRequest = async (req: Request): Promise<string> => {
export const getAccountForRequest = async (req: Request) => {
if (!req.query.accountId) {
throw new Error("Request is missing accountId parameter");
}
@ -61,5 +61,9 @@ export const getAccountIdForRequest = async (req: Request): Promise<string> => {
if (!account) {
throw new Error("Invalid accountId-nonce pair");
}
return account._id.toString();
return account;
};
export const getAccountIdForRequest = async (req: Request): Promise<string> => {
return (await getAccountForRequest(req))._id.toString();
};