feat(web): options to disable machine

This commit is contained in:
BennyKok
2023-12-21 13:39:36 +08:00
parent eda922a5e3
commit 61d3e2f65a
10 changed files with 744 additions and 55 deletions
+1 -1
View File
@@ -7,6 +7,6 @@ export async function wrapServerPromise<T>(result: Promise<T>) {
}
export function withServerPromise<T extends (...args: any[]) => Promise<any>>(
fn: T
): (...args: Parameters<T>) => Promise<ReturnType<T> | { error: string; }> {
): (...args: Parameters<T>) => Promise<ReturnType<T> | { error: string }> {
return (...args: Parameters<T>) => wrapServerPromise(fn(...args));
}