Feat: Initial Setup through env vars (#1736)
* initial support for initial setup * improve setup * improve mobile view * move base admin route * admin panel mobile view * set initial host and port * add docs * properly setup everything, use for dev env * change userconfig and interface port on setup, note users afterwards
This commit is contained in:
@@ -2,11 +2,10 @@ export default defineEventHandler(async (event) => {
|
||||
const session = await useWGSession(event);
|
||||
|
||||
if (!session.data.userId) {
|
||||
throw createError({
|
||||
statusCode: 401,
|
||||
statusMessage: 'Not logged in',
|
||||
});
|
||||
// not logged in
|
||||
return null;
|
||||
}
|
||||
|
||||
const user = await Database.users.get(session.data.userId);
|
||||
if (!user) {
|
||||
throw createError({
|
||||
|
||||
Reference in New Issue
Block a user