mirror of https://github.com/wg-easy/wg-easy
16 changed files with 60 additions and 38 deletions
@ -56,9 +56,6 @@ importers: |
|||||
timeago.js: |
timeago.js: |
||||
specifier: ^4.0.2 |
specifier: ^4.0.2 |
||||
version: 4.0.2 |
version: 4.0.2 |
||||
uuid: |
|
||||
specifier: ^10.0.0 |
|
||||
version: 10.0.0 |
|
||||
vue: |
vue: |
||||
specifier: latest |
specifier: latest |
||||
version: 3.4.37([email protected]) |
version: 3.4.37([email protected]) |
||||
@ -81,9 +78,6 @@ importers: |
|||||
'@types/qrcode': |
'@types/qrcode': |
||||
specifier: ^1.5.5 |
specifier: ^1.5.5 |
||||
version: 1.5.5 |
version: 1.5.5 |
||||
'@types/uuid': |
|
||||
specifier: ^10.0.0 |
|
||||
version: 10.0.0 |
|
||||
eslint: |
eslint: |
||||
specifier: ^9.8.0 |
specifier: ^9.8.0 |
||||
version: 9.8.0 |
version: 9.8.0 |
||||
@ -1260,9 +1254,6 @@ packages: |
|||||
'@types/[email protected]': |
'@types/[email protected]': |
||||
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} |
resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} |
||||
|
|
||||
'@types/[email protected]': |
|
||||
resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==} |
|
||||
|
|
||||
'@typescript-eslint/[email protected]': |
'@typescript-eslint/[email protected]': |
||||
resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==} |
resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==} |
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} |
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} |
||||
@ -4212,10 +4203,6 @@ packages: |
|||||
[email protected]: |
[email protected]: |
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} |
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} |
||||
|
|
||||
[email protected]: |
|
||||
resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} |
|
||||
hasBin: true |
|
||||
|
|
||||
[email protected]: |
[email protected]: |
||||
resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} |
resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} |
||||
|
|
||||
@ -5740,8 +5727,6 @@ snapshots: |
|||||
|
|
||||
'@types/[email protected]': {} |
'@types/[email protected]': {} |
||||
|
|
||||
'@types/[email protected]': {} |
|
||||
|
|
||||
'@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])': |
'@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])': |
||||
dependencies: |
dependencies: |
||||
'@eslint-community/regexpp': 4.11.0 |
'@eslint-community/regexpp': 4.11.0 |
||||
@ -9078,8 +9063,6 @@ snapshots: |
|||||
|
|
||||
[email protected]: {} |
[email protected]: {} |
||||
|
|
||||
[email protected]: {} |
|
||||
|
|
||||
[email protected]: |
[email protected]: |
||||
dependencies: |
dependencies: |
||||
spdx-correct: 3.2.0 |
spdx-correct: 3.2.0 |
||||
|
|||||
@ -1,6 +1,11 @@ |
|||||
export default defineEventHandler((event) => { |
export default defineEventHandler(async (event) => { |
||||
setHeader(event, 'Content-Type', 'application/json'); |
setHeader(event, 'Content-Type', 'application/json'); |
||||
// Weird issue with auto import not working. This alias is needed
|
const system = await Database.getSystem(); |
||||
const stats = UI_TRAFFIC_STATS; |
if (!system) |
||||
return stats === 'true' ? true : false; |
throw createError({ |
||||
|
statusCode: 500, |
||||
|
statusMessage: 'Invalid', |
||||
|
}); |
||||
|
|
||||
|
return system.trafficStats.enabled; |
||||
}); |
}); |
||||
|
|||||
@ -1,5 +1,11 @@ |
|||||
export default defineEventHandler((event) => { |
export default defineEventHandler(async (event) => { |
||||
setHeader(event, 'Content-Type', 'application/json'); |
setHeader(event, 'Content-Type', 'application/json'); |
||||
const expires = WG_ENABLE_EXPIRES_TIME; |
const system = await Database.getSystem(); |
||||
return expires === 'true' ? true : false; |
if (!system) |
||||
|
throw createError({ |
||||
|
statusCode: 500, |
||||
|
statusMessage: 'Invalid', |
||||
|
}); |
||||
|
|
||||
|
return system.wgEnableExpiresTime; |
||||
}); |
}); |
||||
|
|||||
@ -1,5 +1,11 @@ |
|||||
export default defineEventHandler((event) => { |
export default defineEventHandler(async (event) => { |
||||
setHeader(event, 'Content-Type', 'application/json'); |
setHeader(event, 'Content-Type', 'application/json'); |
||||
const otl = WG_ENABLE_ONE_TIME_LINKS; |
const system = await Database.getSystem(); |
||||
return otl === 'true' ? true : false; |
if (!system) |
||||
|
throw createError({ |
||||
|
statusCode: 500, |
||||
|
statusMessage: 'Invalid', |
||||
|
}); |
||||
|
|
||||
|
return system.wgEnableOneTimeLinks; |
||||
}); |
}); |
||||
|
|||||
Loading…
Reference in new issue