mirror of https://github.com/wg-easy/wg-easy
21 changed files with 137 additions and 142 deletions
@ -56,6 +56,9 @@ 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]) |
||||
@ -78,6 +81,9 @@ 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 |
||||
@ -1254,6 +1260,9 @@ 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} |
||||
@ -4203,6 +4212,10 @@ 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==} |
||||
|
|
||||
@ -5727,6 +5740,8 @@ 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 |
||||
@ -9063,6 +9078,8 @@ snapshots: |
|||||
|
|
||||
[email protected]: {} |
[email protected]: {} |
||||
|
|
||||
|
[email protected]: {} |
||||
|
|
||||
[email protected]: |
[email protected]: |
||||
dependencies: |
dependencies: |
||||
spdx-correct: 3.2.0 |
spdx-correct: 3.2.0 |
||||
|
|||||
@ -1,4 +1,4 @@ |
|||||
export default defineEventHandler(async (event) => { |
export default defineEventHandler(async (event) => { |
||||
setHeader(event, 'Content-Type', 'application/json'); |
setHeader(event, 'Content-Type', 'application/json'); |
||||
return await Database.getLang(); |
return Database.getLang(); |
||||
}); |
}); |
||||
|
|||||
@ -1,8 +1,14 @@ |
|||||
export default defineEventHandler(async () => { |
export default defineEventHandler(async () => { |
||||
const release = Number.parseInt(RELEASE, 10); |
const system = await Database.getSystem(); |
||||
|
if (!system) |
||||
|
throw createError({ |
||||
|
statusCode: 400, |
||||
|
statusMessage: 'Invalid', |
||||
|
}); |
||||
|
|
||||
const latestRelease = await fetchLatestRelease(); |
const latestRelease = await fetchLatestRelease(); |
||||
return { |
return { |
||||
currentRelease: release, |
currentRelease: system.release, |
||||
latestRelease: latestRelease, |
latestRelease: latestRelease, |
||||
}; |
}; |
||||
}); |
}); |
||||
|
|||||
@ -1,11 +1,9 @@ |
|||||
export default defineEventHandler(async (event) => { |
export default defineEventHandler(async (event) => { |
||||
const session = await useWGSession(event); |
const session = await useWGSession(event); |
||||
const authenticated = REQUIRES_PASSWORD |
const authenticated = session.data.authenticated === true; |
||||
? session.data.authenticated === true |
|
||||
: true; |
|
||||
|
|
||||
return { |
return { |
||||
requiresPassword: REQUIRES_PASSWORD, |
requiresPassword: true, |
||||
authenticated, |
authenticated, |
||||
}; |
}; |
||||
}); |
}); |
||||
|
|||||
Loading…
Reference in new issue