automigrate xd

This commit is contained in:
2026-08-18 01:05:52 +02:00
parent 7dbd7fe270
commit 972371e7c8
2 changed files with 16 additions and 4 deletions

View File

@@ -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`