Added back the allowed versions list #1

Merged
Lncvrt merged 2 commits from (deleted):puppet-patch-1 into main 2026-02-24 21:45:17 +00:00
Showing only changes of commit 9c54a4583b - Show all commits
+13 -1
View File
@@ -11,7 +11,19 @@ export const handler = async ({ request, set }: Context) => {
const requester = request.headers.get('Requester') ?? '0'
const clientVersion = request.headers.get('ClientVersion') ?? '0'
if (requester === 'BerryDashGodotClient') return 'all;1.0.0'
if (requester === 'BerryDashGodotClient') {
const allowedVersions = ["1.0.0", "1.1.0"]
let permissions = "all"
if (allowedVersions.indexOf(clientVersion) !== -1) {
permissions = "all"
} else {
permissions = "client"
}
return permissions + ';1.1.0'
Outdated
Review

Could you make this instead of hard coding that value, that it will just get the last entry in the array?

Could you make this instead of hard coding that value, that it will just get the last entry in the array?
Outdated
Review

Also I do know that would be changed each time, but I would rather it not be duplicated.

Also I do know that would be changed each time, but I would rather it not be duplicated.
}
else if (isLatestVersion(clientVersion)) return '1'
else if (isBetaVersion(clientVersion)) return '4'
else if (