Skip to content

Commit

Permalink
Update +page.server.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherPillow committed Nov 29, 2023
1 parent d58cce0 commit 47fb5b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ import {
import NodeFormData from 'form-data'
import { Buffer } from 'buffer';

const endUnix = 1698551940*1000

/** @type {import('./$types').Actions} */
export const actions = {
default: async (event) => {
const isOver = (new Date() as unknown as number) > endUnix

if (isOver) return {
success: false,
}

const { fetch } = event;
const host = event.request.headers.get('host')

Expand Down

0 comments on commit 47fb5b7

Please sign in to comment.