add better client sync schemes initialization,
add client sync scheme selects to localdb, start on interrupt sync scheme implementation, change sync endpoints to start with /sync/
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {createHash} from "crypto";
|
||||
import { createHash } from "crypto";
|
||||
|
||||
import { getUsedResources, requestPVE } from "./pve.js";
|
||||
import { db } from "./db.js";
|
||||
@@ -94,9 +94,8 @@ export async function approveResources (req, username, request) {
|
||||
return approved; // if all requested resources pass, allow
|
||||
}
|
||||
|
||||
|
||||
export function getObjectHash (object, alg = "sha256", format = "hex") {
|
||||
const hash = createHash(alg);
|
||||
hash.update(JSON.stringify(object, Object.keys(object).sort()));
|
||||
return hash.digest(format);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user