mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 17:56:37 +08:00
prettier
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {BaseService} from '@/lib/services/core';
|
||||
import { BaseService } from '@/lib/services/core';
|
||||
import type {
|
||||
CreateSystemConfigRequest,
|
||||
SystemConfig,
|
||||
@@ -8,11 +8,15 @@ import type {
|
||||
export class AdminSystemConfigService extends BaseService {
|
||||
protected static readonly basePath = '/api/v1/admin';
|
||||
|
||||
static async createSystemConfig(request: CreateSystemConfigRequest): Promise<void> {
|
||||
static async createSystemConfig(
|
||||
request: CreateSystemConfigRequest,
|
||||
): Promise<void> {
|
||||
return this.post<void>('/system-configs', request);
|
||||
}
|
||||
|
||||
static async listSystemConfigs(type?: 'system' | 'business'): Promise<SystemConfig[]> {
|
||||
static async listSystemConfigs(
|
||||
type?: 'system' | 'business',
|
||||
): Promise<SystemConfig[]> {
|
||||
const query = type ? `?type=${type}` : '';
|
||||
return this.get<SystemConfig[]>(`/system-configs${query}`);
|
||||
}
|
||||
@@ -21,7 +25,10 @@ export class AdminSystemConfigService extends BaseService {
|
||||
return this.get<SystemConfig>(`/system-configs/${key}`);
|
||||
}
|
||||
|
||||
static async updateSystemConfig(key: string, request: UpdateSystemConfigRequest): Promise<void> {
|
||||
static async updateSystemConfig(
|
||||
key: string,
|
||||
request: UpdateSystemConfigRequest,
|
||||
): Promise<void> {
|
||||
return this.put<void>(`/system-configs/${key}`, request);
|
||||
}
|
||||
|
||||
@@ -41,4 +48,4 @@ export class AdminSystemConfigService extends BaseService {
|
||||
static async listUploadTypes(): Promise<string[]> {
|
||||
return this.get<string[]>('/uploads/types');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user