mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2025-10-03 09:49:32 +02:00
Merge branch 'master' into development
This commit is contained in:
commit
24fa354f09
4 changed files with 609 additions and 469 deletions
1065
package-lock.json
generated
1065
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -38,8 +38,8 @@
|
||||||
"@types/lodash": "^4.14.166",
|
"@types/lodash": "^4.14.166",
|
||||||
"@types/node": "^16.11.59",
|
"@types/node": "^16.11.59",
|
||||||
"@types/nodemailer": "^6.4.4",
|
"@types/nodemailer": "^6.4.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
||||||
"@typescript-eslint/parser": "^5.10.0",
|
"@typescript-eslint/parser": "^7.18.0",
|
||||||
"eslint": "^8.7.0",
|
"eslint": "^8.7.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"typescript": "^5.5.4",
|
"typescript": "^5.5.4",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* server component for the TimeLimit App
|
* server component for the TimeLimit App
|
||||||
* Copyright (C) 2019 - 2022 Jonas Lochmann
|
* Copyright (C) 2019 - 2024 Jonas Lochmann
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -26,7 +26,7 @@ export const config = {
|
||||||
expireTimeRounding: 1000 * 60 * 15
|
expireTimeRounding: 1000 * 60 * 15
|
||||||
}
|
}
|
||||||
|
|
||||||
export function calculateExpireTime(now: bigint): BigInt {
|
export function calculateExpireTime(now: bigint): bigint {
|
||||||
const expireBaseTime = now + BigInt(config.expireDelay)
|
const expireBaseTime = now + BigInt(config.expireDelay)
|
||||||
const expireTime = expireBaseTime - expireBaseTime % BigInt(config.expireTimeRounding) + BigInt(config.expireTimeRounding)
|
const expireTime = expireBaseTime - expireBaseTime % BigInt(config.expireTimeRounding) + BigInt(config.expireTimeRounding)
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,10 @@ export const createUmzug = (sequelize: Sequelize) => (
|
||||||
migrations: {
|
migrations: {
|
||||||
glob: resolve(__dirname, '../../../build/database/migration/migrations/*.js'),
|
glob: resolve(__dirname, '../../../build/database/migration/migrations/*.js'),
|
||||||
resolve: ({ name, path }) => {
|
resolve: ({ name, path }) => {
|
||||||
const migration = require(path!!)
|
if (!path) throw new Error()
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const migration = require(path)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue