AI Implementation feature(892): Admin Area General Settings and Categories 1.10 (#32)
This commit was merged in pull request #32.
This commit is contained in:
@@ -69,7 +69,11 @@ export class AdminGeneralService {
|
||||
this.settings.set(SETTINGS_KEYS.DEFAULT_CHALLENGE_IP, payload.defaultChallengeIp),
|
||||
this.settings.set(SETTINGS_KEYS.REGISTRATIONS_ENABLED, payload.registrationsEnabled ? 'true' : 'false'),
|
||||
]);
|
||||
this.hub.emitEvent({ topic: 'general', themeKey: payload.themeKey });
|
||||
this.hub.emitEvent({
|
||||
topic: 'general',
|
||||
themeKey: payload.themeKey,
|
||||
registrationsEnabled: payload.registrationsEnabled,
|
||||
});
|
||||
return this.getSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,13 +62,22 @@ export class SystemController {
|
||||
),
|
||||
);
|
||||
const hub$ = this.hub.event$().pipe(
|
||||
map((payload: any) => ({
|
||||
status: payload?.status,
|
||||
countdownMs: payload?.countdownMs,
|
||||
serverNowUtc: payload?.serverNowUtc,
|
||||
startUtc: payload?.startUtc,
|
||||
endUtc: payload?.endUtc,
|
||||
})),
|
||||
map((payload: any) => {
|
||||
if (payload && payload.topic === 'general') {
|
||||
return {
|
||||
topic: 'general',
|
||||
themeKey: payload.themeKey,
|
||||
registrationsEnabled: payload.registrationsEnabled,
|
||||
};
|
||||
}
|
||||
return {
|
||||
status: payload?.status,
|
||||
countdownMs: payload?.countdownMs,
|
||||
serverNowUtc: payload?.serverNowUtc,
|
||||
startUtc: payload?.startUtc,
|
||||
endUtc: payload?.endUtc,
|
||||
};
|
||||
}),
|
||||
);
|
||||
return merge(tick$, hub$).pipe(map((src) => ({ data: src }) as MessageEvent));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user