Refactoring and reworking dbsetup route
This commit is contained in:
+3
-1
@@ -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);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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>>
|
||||
]
|
||||
Reference in New Issue
Block a user