added offline inquiry in system setting also fix some bugs

This commit is contained in:
2026-08-03 11:49:24 +03:30
parent ab4f667c8d
commit 7f672541ae
19 changed files with 965 additions and 26 deletions

View File

@@ -4,7 +4,12 @@ describe("FanavaranAuthService", () => {
const createAuthTokenModel = () => {
const store = new Map<
string,
{ clientKey: string; authenticationToken: string; expiresAt: Date }
{
clientKey: string;
authenticationToken: string;
expiresAt: Date;
authFingerprint?: string;
}
>();
return {
findOne: jest.fn((query: { clientKey: string }) => ({
@@ -15,13 +20,20 @@ describe("FanavaranAuthService", () => {
findOneAndUpdate: jest.fn(
(
query: { clientKey: string },
update: { $set: { authenticationToken: string; expiresAt: Date } },
update: {
$set: {
authenticationToken: string;
expiresAt: Date;
authFingerprint?: string;
};
},
) => ({
exec: async () => {
const next = {
clientKey: query.clientKey,
authenticationToken: update.$set.authenticationToken,
expiresAt: update.$set.expiresAt,
authFingerprint: update.$set.authFingerprint,
};
store.set(query.clientKey, next);
return next;