Working on the API route for upload and the ping. adding types for actions.

This commit is contained in:
charles-gauthereau
2024-11-29 20:04:32 +01:00
parent e49a953852
commit bf4fce3a96
18 changed files with 283 additions and 30 deletions
+6
View File
@@ -0,0 +1,6 @@
export type ServerActionResult<T> = { success: true; value: T; actionSuccess?: ActionSuccessMessage } | { success: false; actionError: ActionErrorMessage };
export type ActionErrorMessage = { message?: string; status?: number; cause?: string; messageParams?: Record<string, string | number> };
export type ActionSuccessMessage = { message?: string; messageParams?: Record<string, string | number> };