fix build errors
This commit is contained in:
@@ -11,7 +11,7 @@ interface CreateServerModalProps {
|
|||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialState: ServerActionResult = { success: false, message: '' };
|
const initialState: ServerActionResult = { success: false, message: '', data: undefined };
|
||||||
|
|
||||||
export function CreateServerModal({ isOpen, onClose }: CreateServerModalProps) {
|
export function CreateServerModal({ isOpen, onClose }: CreateServerModalProps) {
|
||||||
const [serverName, setServerName] = useState('');
|
const [serverName, setServerName] = useState('');
|
||||||
|
|||||||
@@ -4,10 +4,14 @@ import { revalidatePath } from 'next/cache';
|
|||||||
import { requireAuth } from '@/lib/auth/server';
|
import { requireAuth } from '@/lib/auth/server';
|
||||||
import { createServer, deleteServer } from '@/lib/api/server/servers';
|
import { createServer, deleteServer } from '@/lib/api/server/servers';
|
||||||
|
|
||||||
|
export type ServerActionData = {
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
|
||||||
export type ServerActionResult = {
|
export type ServerActionResult = {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
message: string;
|
message: string;
|
||||||
data?: any;
|
data?: ServerActionData;
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function createServerAction(
|
export async function createServerAction(
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
import { fetchServerAPI } from './base';
|
import { fetchServerAPI } from './base';
|
||||||
import type {
|
import type { Configurations, ConfigFile, Config } from '@/lib/types/config';
|
||||||
Configurations,
|
|
||||||
Configuration,
|
|
||||||
AssistRules,
|
|
||||||
EventConfig,
|
|
||||||
EventRules,
|
|
||||||
ServerSettings,
|
|
||||||
ConfigFile,
|
|
||||||
Config
|
|
||||||
} from '@/lib/types/config';
|
|
||||||
|
|
||||||
const serverRoute = '/server';
|
const serverRoute = '/server';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user