aboutsummaryrefslogtreecommitdiff
path: root/src/routes/+layout.server.ts
blob: 1b7bf69a2fea17001064832e7ef77e42e4f298ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export const load = ({ locals, url, cookies }) => {
  const { user } = locals;

  if (cookies.get('logout') === '1') {
    cookies.delete('user', { path: '/' });
    cookies.delete('logout', { path: '/' });
  }

  return {
    user,
    url: url.pathname,
    commit: process.env.VERCEL_GIT_COMMIT_SHA ?? 'ffffffffffffffffffffffffffffffffffffffff'
  };
};