automigrate xd
This commit is contained in:
@@ -24,9 +24,16 @@ export default (router, tpl) => {
|
||||
`;
|
||||
|
||||
// Get custom avatar file and banner file if exists
|
||||
const userOptions = (await db`
|
||||
select avatar_file, banner_file from user_options where user_id = ${+req.session.id}
|
||||
`)[0];
|
||||
let userOptions = null;
|
||||
try {
|
||||
userOptions = (await db`
|
||||
select avatar_file, banner_file, banner_position, banner_size from user_options where user_id = ${+req.session.id}
|
||||
`)[0];
|
||||
} catch (err) {
|
||||
userOptions = (await db`
|
||||
select avatar_file from user_options where user_id = ${+req.session.id}
|
||||
`)[0];
|
||||
}
|
||||
|
||||
// Get full user info
|
||||
const user = (await db`
|
||||
|
||||
Reference in New Issue
Block a user