diff --git a/src/constants/Scopes.ts b/src/constants/Scopes.ts index 053ddda..84bd6fb 100644 --- a/src/constants/Scopes.ts +++ b/src/constants/Scopes.ts @@ -10,4 +10,6 @@ const userScope = /* surrealql */ ` password: crypto::argon2::generate($password) } ) -`; \ No newline at end of file +`; + +export default userScope; \ No newline at end of file diff --git a/src/constants/types/User.types.ts b/src/constants/types/User.types.ts index befcb37..f1dd403 100644 --- a/src/constants/types/User.types.ts +++ b/src/constants/types/User.types.ts @@ -1,5 +1,5 @@ -import { z } from "zod"; -import { record } from "./Common.types"; +import { z } from 'zod'; +import { record } from './Common.types'; const user: string = /* surrealql */ ` DEFINE TABLE user SCHEMAFULL @@ -20,7 +20,7 @@ export const User = z.object({ id: record('user'), username: z.string(), email: z.string().email(), - password: z.string() + password: z.string(), }); -export default user; \ No newline at end of file +export default user; diff --git a/src/library/surreal.ts b/src/library/surreal.ts index a0bbbbb..908c330 100644 --- a/src/library/surreal.ts +++ b/src/library/surreal.ts @@ -1,9 +1,9 @@ import { Surreal } from 'surrealdb.js'; export const database = new Surreal({ - onConnect: () => console.log("Database connected."), - onClose: () => console.log("Database disconnected."), - onError: () => console.error("Database encountered an error.") + onConnect: () => console.log('Database connected.'), + onClose: () => console.log('Database disconnected.'), + onError: () => console.error('Database encountered an error.'), }); -export const query = (q: string) => database.query(q); \ No newline at end of file +export const query = (q: string) => database.query(q); diff --git a/src/main.ts b/src/main.ts index 8936503..fa6336b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,17 +1,17 @@ -import { createApp } from 'vue'; -import { createMetaManager } from 'vue-meta'; -import { createRouter, createWebHistory } from 'vue-router'; import App from '@/App.vue'; +import { database } from '@/library/surreal'; import DiscoverVue from '@/routes/Discover.vue'; import HomeVue from '@/routes/Home.vue'; import LibraryVue from '@/routes/Library.vue'; import '@/style.css'; -import { database } from '@/library/surreal'; +import { createApp } from 'vue'; +import { createMetaManager } from 'vue-meta'; +import { createRouter, createWebHistory } from 'vue-router'; import RoughAuthVue from './routes/RoughAuth.vue'; database.connect(import.meta.env.VITE_DB_URL, { namespace: 'leafal_io', - database: 'leafal_io-' + import.meta.env.MODE + database: 'leafal_io-' + import.meta.env.MODE, }); const router = createRouter({ diff --git a/src/routes/RoughAuth.vue b/src/routes/RoughAuth.vue index d1faeae..ed4aa89 100644 --- a/src/routes/RoughAuth.vue +++ b/src/routes/RoughAuth.vue @@ -1,34 +1,40 @@ @@ -36,16 +42,32 @@ import { database } from '@/library/surreal'; Login - - + + Submit Register - - - + + + Submit