New: backendのtsconfig.jsonにesModuleInteropを追加 / Fix: 一部エンティティの時刻記録をdateからdatetimeに修正 / Fix: setup/initializationエンドポイントでのwebpushのimport方法の問題 / Chg: font-sizeを16pxから14pxに変更 / Chg: html, bodyのwidthとheightをvw/vhからdvw/dvhに変更 / Feat: レイアウトを作成 / New(frontend): /setupを作成
This commit is contained in:
@@ -27,13 +27,13 @@ export class TokenEntity {
|
||||
isNative!: boolean;
|
||||
|
||||
@Property({
|
||||
type: "date",
|
||||
type: "datetime",
|
||||
onCreate: () => new Date(),
|
||||
})
|
||||
createdAt!: Date;
|
||||
|
||||
@Property({
|
||||
type: "date",
|
||||
type: "datetime",
|
||||
nullable: true,
|
||||
})
|
||||
lastUsedAt?: Date;
|
||||
|
||||
@@ -51,7 +51,7 @@ export class UserEntity {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
})
|
||||
isAdmin: boolean = false;
|
||||
isOwner: boolean = false;
|
||||
|
||||
@Property({
|
||||
type: "boolean",
|
||||
@@ -64,4 +64,10 @@ export class UserEntity {
|
||||
onCreate: () => new Date(),
|
||||
})
|
||||
createdAt!: Date;
|
||||
|
||||
@Property({
|
||||
type: "datetime",
|
||||
nullable: true,
|
||||
})
|
||||
lastUsedAt?: Date;
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { DatabaseError, ErrorBase, InputError } from "@/errors";
|
||||
import Logger from "@/lib/logger";
|
||||
import { ConfigEntity } from "@/modules/entities/Config";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import { generateVAPIDKeys } from "web-push";
|
||||
import webpush from "web-push";
|
||||
import z from "zod/v3";
|
||||
|
||||
export default function SetupInitialization(fastify: FastifyInstance) {
|
||||
@@ -48,7 +48,7 @@ export default function SetupInitialization(fastify: FastifyInstance) {
|
||||
try {
|
||||
const entries = Object.entries(result.data).filter(([key]) => key !== "force");
|
||||
|
||||
const vapid = generateVAPIDKeys();
|
||||
const vapid = webpush.generateVAPIDKeys();
|
||||
entries.push(["VAPID_PUBLIC", vapid.publicKey]);
|
||||
entries.push(["VAPID_PRIVATE", vapid.privateKey]);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"isolatedModules": true,
|
||||
|
||||
Reference in New Issue
Block a user