mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
Implement HostInfo as a class
Replace POJO definition of HostInfo with a class that properly manages its own serialisation to JSON.
This commit is contained in:
1 parent
20330bc2c3
commit
c248363895
6 files changed
+137
-60
No files matched your search
@@ -152,7 +152,7 @@ function validateHostToken(req: Request, res: Response, next: any) {
|
||||
if (!host) {
|
||||
throw new Error("invalid host");
|
||||
}
|
||||
if (!tokenPayload.iat || tokenPayload.iat < (host.token_valid_after??0)) {
|
||||
if (!tokenPayload.iat || tokenPayload.iat < (host.tokenValidAfter ?? 0)) {
|
||||
throw new Error("invalid token");
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user