This commit is contained in:
2026-02-05 02:29:50 +08:00
parent 01e597ac93
commit bb215fd492
7 changed files with 89 additions and 27 deletions

View File

@@ -24,7 +24,9 @@ class Api {
private headers(): Record<string, string> {
const h: Record<string, string> = { 'Content-Type': 'application/json' };
if (this.userId) h['X-User-ID'] = String(this.userId);
if (this.userId > 0) {
h['X-User-ID'] = String(this.userId);
}
return h;
}