add user banners :)
This commit is contained in:
@@ -534,6 +534,7 @@ export default {
|
||||
uo.display_name as author_display_name,
|
||||
uo.avatar as author_avatar,
|
||||
uo.avatar_file as author_avatar_file,
|
||||
uo.banner_file as author_banner_file,
|
||||
uo.description as author_description,
|
||||
author_u.id as author_id,
|
||||
items.is_pinned,
|
||||
@@ -794,6 +795,7 @@ export default {
|
||||
author_display_name: actitem.author_display_name || null,
|
||||
author_avatar: actitem.author_avatar,
|
||||
author_avatar_file: actitem.author_avatar_file,
|
||||
author_banner_file: actitem.author_banner_file,
|
||||
author_description: actitem.author_description,
|
||||
title: actitem.title || null,
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ export default (router, tpl) => {
|
||||
join tags t on t.id = et.id
|
||||
`;
|
||||
|
||||
// Get custom avatar file if exists
|
||||
// Get custom avatar file and banner file if exists
|
||||
const userOptions = (await db`
|
||||
select avatar_file from user_options where user_id = ${+req.session.id}
|
||||
select avatar_file, banner_file from user_options where user_id = ${+req.session.id}
|
||||
`)[0];
|
||||
|
||||
// Get full user info
|
||||
@@ -46,8 +46,10 @@ export default (router, tpl) => {
|
||||
sessions,
|
||||
excluded_tags: excluded_tags || [],
|
||||
avatar_file: userOptions?.avatar_file || null,
|
||||
banner_file: userOptions?.banner_file || null,
|
||||
email: user?.email || '',
|
||||
joined: user?.created_at || null,
|
||||
user_banner_enabled: cfg.websrv.user_banner_enabled !== false,
|
||||
enable_swf: cfg.enable_swf,
|
||||
enable_data_export: cfg.websrv.enable_data_export,
|
||||
enable_user_api_keys: cfg.websrv.enable_user_api_keys !== false,
|
||||
|
||||
Reference in New Issue
Block a user