refactor(docs): update project documentation for clarity and accuracy
Deploy to VPS / deploy (push) Failing after 1m38s

This commit is contained in:
asepharyana
2026-07-26 13:45:05 +07:00
parent 702f96262e
commit 9ecc4a6caa
5 changed files with 218 additions and 31 deletions
@@ -1,11 +1,6 @@
import { useEffect, useState } from "react";
import { configApi } from "@/lib/api";
export interface AppConfig {
monitorGuildId: string | null;
webserverPort?: number;
nodeEnv?: string;
}
import type { AppConfig } from "@/lib/types/guild";
export function useAppConfig() {
const [config, setConfig] = useState<AppConfig | null>(null);
@@ -15,9 +10,7 @@ export function useAppConfig() {
configApi
.get()
.then((cfg) => {
setConfig({
monitorGuildId: cfg.monitor_guild_id ?? null,
});
setConfig(cfg);
})
.catch(() => {
// silent — config fetch is not critical
+14 -1
View File
@@ -11,6 +11,19 @@ export interface Channel {
parent_id?: string | null;
}
/** Shape of the /api/config response (camelCase keys from backend). */
export interface AppConfig {
monitor_guild_id?: string | null;
monitorGuildId: string | null;
webserverPort?: number;
nodeEnv?: string;
backlogSyncHours?: number;
backlogSyncBatchSize?: number;
retentionMessagesDays?: number;
retentionAttachmentsDays?: number;
retentionVoiceDays?: number;
autoDeleteFlaggedEnabled?: boolean;
aiAnalysisEnabled?: boolean;
voiceGuildId?: string | null;
voiceChannelId?: string | null;
logLevel?: string;
}