Skip to content

Commit ffcacb4

Browse files
committed
core: add missing exports
1 parent 9a980c4 commit ffcacb4

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/hydrooj/src/handler/manage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,13 @@ class SystemDashboardHandler extends SystemHandler {
9090
}
9191

9292
class SystemScriptHandler extends SystemHandler {
93+
@requireSudo
9394
async get() {
9495
this.response.template = 'manage_script.html';
9596
this.response.body.scripts = global.Hydro.script;
9697
}
9798

99+
@requireSudo
98100
@param('id', Types.Name)
99101
@param('args', Types.Content, true)
100102
async post(domainId: string, id: string, raw = '{}') {

packages/hydrooj/src/model/setting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ AccountSetting(
267267
'/components/profile/backgrounds/1.jpg', 'text', 'Profile Background Image',
268268
'Choose the background image in your profile page.'),
269269
Setting('setting_storage', 'unreadMsg', 0, 'number', 'Unread Message Count', null, FLAG_DISABLED | FLAG_HIDDEN),
270-
Setting('setting_storage', 'badge', '', 'text', 'badge info', null, FLAG_DISABLED | FLAG_HIDDEN),
270+
Setting('setting_storage', 'badge', '', 'text', 'badge info', null, FLAG_DISABLED | FLAG_HIDDEN | FLAG_PUBLIC),
271271
Setting('setting_storage', 'banReason', '', 'text', 'ban reason', null, FLAG_DISABLED | FLAG_HIDDEN),
272272
Setting('setting_storage', 'pinnedDomains', [], 'json', 'pinned domains', null, FLAG_DISABLED | FLAG_HIDDEN),
273273
);

packages/hydrooj/src/model/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class User {
163163
}
164164

165165
getFields(type: 'public' | 'private' = 'public') {
166-
const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'avatar'].concat(this._publicFields);
166+
const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'avatar', 'avatarUrl'].concat(this._publicFields);
167167
return type === 'public' ? fields : fields.concat(this._privateFields);
168168
}
169169

0 commit comments

Comments
 (0)