aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorPitu <[email protected]>2020-05-10 20:00:52 +0900
committerPitu <[email protected]>2020-05-10 20:00:52 +0900
commit6da29eb7c1f9f39ca924330dc42400cdf0af16e1 (patch)
treea8b258fee5696b238fc871f5f1e314561f5fbd57 /src/api
parentchore: forgot to remove this uuid (diff)
downloadhost.fuwn.me-6da29eb7c1f9f39ca924330dc42400cdf0af16e1.tar.xz
host.fuwn.me-6da29eb7c1f9f39ca924330dc42400cdf0af16e1.zip
Sort files by newest
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/admin/userGET.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/routes/admin/userGET.js b/src/api/routes/admin/userGET.js
index 895a565..14a6c92 100644
--- a/src/api/routes/admin/userGET.js
+++ b/src/api/routes/admin/userGET.js
@@ -12,7 +12,9 @@ class usersGET extends Route {
try {
const user = await db.table('users').where({ id }).first();
- const files = await db.table('files').where({ userId: user.id });
+ const files = await db.table('files')
+ .where({ userId: user.id })
+ .orderBy('id', 'desc');
for (let file of files) {
file = Util.constructFilePublicLink(file);