mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
Merge origin/main into moderator-tools
The built client is main's here; it is rebuilt from the merged sources. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
d09ee94e16
33 files changed
+649
-230
No files matched your search
+3
-3
@@ -99,7 +99,7 @@ const give = body => {
|
||||
if (!item) {
|
||||
return {status: 409, body: {error: "That inventory is full"}};
|
||||
}
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
if (session) {
|
||||
sendClothingAdded(session, item);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ const give = body => {
|
||||
account.finderGiven[key] = {count: ((account.finderGiven[key] || {}).count || 0) + 1, at: Math.floor(Date.now() / 1000)};
|
||||
const kept = Object.entries(account.finderGiven).sort((one, other) => other[1].at - one[1].at).slice(0, MAX_FAVOURITES);
|
||||
account.finderGiven = Object.fromEntries(kept);
|
||||
accounts.save();
|
||||
accounts.save(account);
|
||||
return {status: 200, body: {ok: true, online: Boolean(session)}};
|
||||
};
|
||||
|
||||
@@ -240,7 +240,7 @@ const handle = async (route, params, body, from) => {
|
||||
const result = accounts.register(username, password, {type: avatarType});
|
||||
if (result.account) {
|
||||
result.account.agreed = {version: config.termsVersion, at: Math.floor(Date.now() / 1000)};
|
||||
accounts.save();
|
||||
accounts.save(result.account);
|
||||
}
|
||||
// the client signs in straight after, and is not asked again.
|
||||
return result.error ? {status: 400, body: {error: result.error}}
|
||||
|
||||
Reference in new issue
Block a user