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