Upgraded dependencies, bumped to Node 24.
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
import config from 'config';
|
||||
import { renderPage } from 'vike/server'; // eslint-disable-line import/extensions
|
||||
import { renderPage } from 'vike/server';
|
||||
|
||||
import { socials } from '../../common/actors.mjs';
|
||||
import { fetchUnseenNotificationsCount } from '../alerts.js';
|
||||
import { fetchUserStashes } from '../stashes.js';
|
||||
import { fetchUserTemplates } from '../users.js';
|
||||
import { fetchUnseenNotificationsCount } from '../alerts.js';
|
||||
import { socials } from '../../common/actors.mjs'; // eslint-disable-line import/namespace
|
||||
|
||||
export default async function mainHandler(req, res, next) {
|
||||
const [stashes, templates, unseenNotifications] = req.user ? await Promise.all([
|
||||
fetchUserStashes(req.user.id, req.user),
|
||||
fetchUserTemplates(req.user),
|
||||
fetchUnseenNotificationsCount(req.user),
|
||||
]) : [];
|
||||
const [stashes, templates, unseenNotifications] = req.user
|
||||
? await Promise.all([
|
||||
fetchUserStashes(req.user.id, req.user),
|
||||
fetchUserTemplates(req.user),
|
||||
fetchUnseenNotificationsCount(req.user),
|
||||
])
|
||||
: [];
|
||||
|
||||
const pageContextInit = {
|
||||
urlOriginal: req.originalUrl,
|
||||
@@ -27,12 +29,14 @@ export default async function mainHandler(req, res, next) {
|
||||
abilities: req.user.abilities,
|
||||
avatar: req.user.avatar,
|
||||
},
|
||||
assets: req.user ? {
|
||||
stashes,
|
||||
primaryStash: stashes.find((stash) => stash.isPrimary),
|
||||
templates,
|
||||
unseenNotifications,
|
||||
} : null,
|
||||
assets: req.user
|
||||
? {
|
||||
stashes,
|
||||
primaryStash: stashes.find((stash) => stash.isPrimary),
|
||||
templates,
|
||||
unseenNotifications,
|
||||
}
|
||||
: null,
|
||||
env: {
|
||||
theme: req.cookies.theme || req.headers['sec-ch-prefers-color-scheme'] || 'light',
|
||||
scenesView: req.cookies.scenesView || 'list',
|
||||
|
||||
Reference in New Issue
Block a user