Refactoring and reworking dbsetup route

This commit is contained in:
2024-06-28 08:03:58 +02:00
parent c076918d05
commit 665da4be29
18 changed files with 390 additions and 162 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
'server only'
import { ReactNode } from "react";
import Gens from "./gens";
// import Auth from "./Auth";
@@ -28,4 +29,5 @@ function truncateString(str:string = '', num:number = 255) {
}
export { Gens, constructAPIUrl, constructUrl, truncateString }
export { Gens, constructAPIUrl, constructUrl, truncateString }
export const aifa = (a: ReactNode, b: ReactNode) => (a ? a : b);
+1 -1
View File
@@ -3,7 +3,7 @@
import { validatePassword } from "@/util/Auth";
import { APIError } from "@/util/api/error";
import { User } from "@/model/User";
import { User } from "@/models";
export function parseBasicAuth(authb64:string):UserAuth
{
+9
View File
@@ -0,0 +1,9 @@
import { Dispatch, SetStateAction } from "react";
export type StateHook<T> = {
state: T;
setState: Dispatch<SetStateAction<T>>;
};
export type StateHookArray<T> = [
T,Dispatch<SetStateAction<T>>
]