mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
core&ui: bug fixes
This commit is contained in:
6 files changed
+10
-8
No files matched your search
@@ -43,12 +43,11 @@ export class FilesHandler extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
@param('uid', Types.Int, true)
|
||||
async get({ }, uid: number) {
|
||||
async get({ }) {
|
||||
if (!this.udoc._files?.length) this.checkPriv(PRIV.PRIV_CREATE_FILE);
|
||||
this.response.body = {
|
||||
files: sortFiles(this.udoc._files),
|
||||
urlForFile: (filename: string) => this.url('fs_download', { uid, filename }),
|
||||
urlForFile: (filename: string) => this.url('fs_download', { uid: this.udoc._id, filename }),
|
||||
};
|
||||
this.response.pjax = 'partials/files.html';
|
||||
this.response.template = 'home_files.html';
|
||||
|
||||
Reference in new issue
Block a user