diff --git a/src/inc/routes/index.mjs b/src/inc/routes/index.mjs index a5b84c7..f8c3308 100644 --- a/src/inc/routes/index.mjs +++ b/src/inc/routes/index.mjs @@ -64,9 +64,10 @@ export default (router, tpl) => { router.get(/^\/ranking$/, async (req, res) => { try { const list = await sql('tags_assign') - .select('user.user') + .select('user.user', sql.raw('coalesce(user_options.avatar, 47319) as avatar')) .leftJoin('user', 'user.id', 'tags_assign.user_id') - .groupBy('user.user') + .leftJoin('user_options', 'user_options.user_id', 'user.id') + .groupBy('user.user', 'user_options.avatar') .orderBy('count', 'desc') .countDistinct('tag_id', 'item_id', { as: 'count' }); diff --git a/views/settings.html b/views/settings.html index bb23e0b..d4ca5b7 100644 --- a/views/settings.html +++ b/views/settings.html @@ -26,23 +26,25 @@ - - - - - + + + @each(sessions as sess) - - - + + - @endeach
idcreated_atlast_usedlast_action  id last action
{{ sess.kmsi ? '⚓' : '' }}{{ sess.id }}{{ new Date(sess.created_at * 1e3).toLocaleString("de-DE") }}{{ new Date(sess.last_used * 1e3).toLocaleString("de-DE") }} +

{{ sess.id }}

+

logout

+
+

last_used: {{ new Date(sess.last_used * 1e3).toLocaleString("de-DE") }}

+

created_at: {{ new Date(sess.created_at * 1e3).toLocaleString("de-DE") }}

+
{{ sess.last_action }}logout