-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
easy easy easy easy easy easy easy easy easy easy easy easy asd test easy easy
- Loading branch information
Showing
20 changed files
with
204 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import js from "@eslint/js"; | ||
import nextPlugin from "@next/eslint-plugin-next"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import reactHooksPlugin from "eslint-plugin-react-hooks"; | ||
import globals from "globals"; | ||
|
||
export default [ | ||
js.configs.recommended, | ||
{ | ||
files: ["**/*.{js,jsx,ts,tsx}"], | ||
languageOptions: { | ||
parser: tsParser, | ||
globals: { | ||
...globals.browser, | ||
...globals.es2021, | ||
...globals.node, | ||
React: "readonly", | ||
}, | ||
}, | ||
plugins: { | ||
"@next/next": nextPlugin, | ||
"react-hooks": reactHooksPlugin, | ||
}, | ||
rules: { | ||
"react-hooks/exhaustive-deps": "off", | ||
"no-unused-vars": [ | ||
"warn", | ||
{ | ||
varsIgnorePattern: "^(NodeJS|other)$", | ||
ignoreRestSiblings: true, | ||
args: "none", | ||
caughtErrors: "none", | ||
}, | ||
], | ||
...nextPlugin.configs.recommended.rules, | ||
}, | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { NextConfig } from "next"; | ||
|
||
const nextConfig: NextConfig = { | ||
/* config options here */ | ||
poweredByHeader: false, | ||
}; | ||
|
||
export default nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { Type as t, type Static } from "@sinclair/typebox/type"; | ||
import Elysia from "elysia"; | ||
|
||
/** | ||
* TypeBox schema Can be used for elysia body params or query schema and in frontend form validation. | ||
*/ | ||
export const authUser = t.Object({ | ||
export const authenticationSchema = t.Object({ | ||
username: t.String({ minLength: 1, maxLength: 128 }), | ||
password: t.String({ minLength: 1, maxLength: 128 }), | ||
test: t.Optional(t.String({ minLength: 1, maxLength: 128 })), | ||
}); | ||
|
||
export const { models: authSchemas } = new Elysia().model({ | ||
authUser: authenticationSchema, | ||
}); | ||
|
||
/** | ||
* TypeScript type derived from the authUser schema. | ||
*/ | ||
export type AuthUser = Static<typeof authUser>; | ||
export type AuthUser = Static<typeof authenticationSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.