From 537fca6b2bd8a3193890cf32143bec03377c7c01 Mon Sep 17 00:00:00 2001 From: Esad Mustafoski Date: Sun, 3 Nov 2024 21:14:04 +0100 Subject: [PATCH] Added a test API for the Database, Unfinished, Meant for testing API Access on the Frontend --- allBase.session.sql | 6 ++ api/main.ts | 24 ++++--- database/esp-projekt.sqlite | Bin 20480 -> 20480 bytes database/utils.ts | 138 ++++++++++++++++++++++++++++++++++++ deno.lock | 113 ++++++++++++++++++++++++++++- src/main.ts | 3 +- 6 files changed, 273 insertions(+), 11 deletions(-) create mode 100644 allBase.session.sql create mode 100644 database/utils.ts diff --git a/allBase.session.sql b/allBase.session.sql new file mode 100644 index 0000000..ac62d04 --- /dev/null +++ b/allBase.session.sql @@ -0,0 +1,6 @@ +INSERT INTO posts (posts_uuid, user_id, created_at, post_text, likes, comments) VALUES +('1a2b3c4d', 1, '2024-11-01 10:00:00', 'Post1', 5, 2), +('2b3c4d5e', 1, '2024-11-02 11:30:00', 'Post2', 10, 3), +('3c4d5e6f', 2, '2024-11-03 12:45:00', 'Post3', 0, 0), +('4d5e6f7g', 2, '2024-11-04 14:20:00', 'Post4', 15, 5), +('5e6f7g8h', 3, '2024-11-05 09:15:00', 'Post5', 8, 1); diff --git a/api/main.ts b/api/main.ts index ae6e6a0..592cd18 100644 --- a/api/main.ts +++ b/api/main.ts @@ -6,15 +6,17 @@ // attempting to find errors, which causes // confusing False errors -// @ts-ignore -import { Router, Application } from "https://deno.land/x/oak/mod.ts"; -// @ts-ignore +// +++ IMPORTS ------------------------------------------------------ // +import { Application, Router } from "https://deno.land/x/oak/mod.ts"; import { oakCors } from "https://deno.land/x/cors/mod.ts"; +import * as db_utils from "../database/utils.ts"; - +// +++ VARIABLES ---------------------------------------------------- // const router = new Router(); const app = new Application(); + +// +++ ROUTER ------------------------------------------------------- // // Creates the routes for the API server. // Example: localhost:8000/api will show "testAPIPoint" // in the HTML @@ -22,15 +24,21 @@ router .get("/", (ctx) => { ctx.response.body = "ESP API Site"; }) - .get("/api", (ctx) => { ctx.response.body = "testAPIPoint"; + }) + .get("/api/users", (ctx) => { + ctx.response.body = "Info from all users here"; //getAllUsers(); + }) + .get("/api/posts", async (ctx) => { + const getPosts = await db_utils.getPostsFromDB(); + const countedPosts = await db_utils.countPosts(); + ctx.response.body = { getPosts, countedPosts }; }); - app.use(oakCors()); app.use(router.routes()); app.use(router.allowedMethods()); -// @ts-ignore -await app.listen({ port: 8000 }); \ No newline at end of file +// @ts-ignore: start app +await app.listen({ port: 8000 }); diff --git a/database/esp-projekt.sqlite b/database/esp-projekt.sqlite index 35d0db68565f1c93e55d3b134f1620e92eef653c..9d23a60d36c35f2255211a777179d0fbe2ea79e2 100644 GIT binary patch delta 358 zcmYk0O-_SA6o6--q|^liYrA;3ZpjP-CSo+{&V@U?011O7p-=&B>ZUz{jTdP21g2|G z;MNnk=sBG62Tk6$c**;e&^Wl)+#Xi2=g;M(0%F$W5&ib1bPy&FrqY0X7fV8ylPs=sv26+w0U{$ znPKnS!dhnqz=Fu9(z>kf`niV7B0 zU8F8tP4foi%$AVlwd|`Wyko7827H2Xm-T_Mh^y?RtYor=G+B-y`B}cK1D#{#o&NI} WFeMEozbWWae}lU8v_FaD-g2)F(VMOP1G@FWn<7Q>)e>KmyfYzvl9O!fz2!efA}{G O7<}NLI6+{Mg8%@Fbq`Mf diff --git a/database/utils.ts b/database/utils.ts new file mode 100644 index 0000000..6ffb92b --- /dev/null +++ b/database/utils.ts @@ -0,0 +1,138 @@ +import { DB } from "https://deno.land/x/sqlite/mod.ts"; +import { dirname, fromFileUrl, join } from "https://deno.land/std/path/mod.ts"; + + +// __dirname Is never getting used again, It's only needed because the DB Import +// from SQLite doesn't like relative paths, so I use this as +// A Workaround +const __dirname:string = dirname(fromFileUrl(import.meta.url)); +const dbPath:string = join(__dirname, "../database/esp-projekt.sqlite"); +const db = new DB(dbPath); + +// Interfaces +interface Post { + posts_uuid: number; + user_id: number; + created_at: string; + post_text: string; + likes: number; + comments: number; +} + + +async function getPostsFromDB() { + let dataresult: Array = []; + try { + const rows = await db.query("SELECT * FROM posts"); + + // Assuming `db.query` returns an array of arrays or tuples + for (const row of rows) { + const [posts_uuid, user_id, created_at, post_text, likes, comments] = row; + + dataresult.push({ + posts_uuid: Number(posts_uuid), // Convert to string if necessary + user_id: Number(user_id), + created_at: String(created_at), // Convert to Date if necessary + post_text: String(post_text), + likes: Number(likes), // Convert to number if necessary + comments: Number(comments), // Convert to number if necessary + }); + } + } catch (error) { + console.error("Error fetching posts", error); + } + return dataresult; +} + +// Test Function, not useful +async function countPosts(): Promise { + let count = 0; + try { + for (const [c] of await db.query("SELECT COUNT(*) FROM posts")) { + count = c as number; + } + } catch (error) { + console.error("Error counting posts:", error); + } + console.log("Total posts:", count); + return count; +} + +function getCommentsForPost(postid: bigint) { +} + +function getCommentsForComments(commentid: bigint) { +} + +function getAllUsers() { + const users = []; + for ( + const [ + user_id, + user_group, + bio, + displayname, + username, + user_email, + password, + firstname, + surname, + account_created, + blocked_users, + followers, + following, + contacts, + ] of db.query("SELECT * FROM Accounts") + ) { + users.push({ + user_id, + user_group, + bio, + displayname, + username, + user_email, + password, + firstname, + surname, + account_created, + blocked_users, + followers, + following, + contacts, + }); + } + return users; +} + +function getUserByID(userid: bigint) { +} + +function getAllPostsFromUser() { +} + +// Filter Functions +function filterForImagePosts() { + return []; +} + +function filterForVideoPosts() { + return []; +} + +function filterForTextPosts() { + return []; +} + +// Export all Functions to make this a module +export { + getPostsFromDB, + countPosts, + getCommentsForPost, + getCommentsForComments, + getAllUsers, + getUserByID, + getAllPostsFromUser, + filterForImagePosts, + filterForVideoPosts, + filterForTextPosts +}; diff --git a/deno.lock b/deno.lock index 10b42c6..79af3d1 100644 --- a/deno.lock +++ b/deno.lock @@ -14,6 +14,7 @@ "jsr:@std/path@1": "1.0.7", "npm:@deno/vite-plugin@*": "1.0.0_vite@5.4.10", "npm:@deno/vite-plugin@1": "1.0.0_vite@5.4.10", + "npm:@types/node@*": "22.5.4", "npm:@vitejs/plugin-vue@*": "5.1.4_vite@5.4.10_vue@3.5.12", "npm:@vitejs/plugin-vue@^5.1.4": "5.1.4_vite@5.4.10_vue@3.5.12", "npm:@vue/runtime-dom@*": "3.5.12", @@ -27,6 +28,7 @@ "npm:vite@*": "5.4.10", "npm:vite@^5.4.10": "5.4.10", "npm:vue-router@4": "4.4.5_vue@3.5.12", + "npm:vue@*": "3.5.12", "npm:vue@^3.5.12": "3.5.12" }, "jsr": { @@ -282,6 +284,12 @@ "@types/estree@1.0.6": { "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" }, + "@types/node@22.5.4": { + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dependencies": [ + "undici-types" + ] + }, "@vitejs/plugin-vue@5.1.4_vite@5.4.10_vue@3.5.12": { "integrity": "sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==", "dependencies": [ @@ -1030,6 +1038,9 @@ "ts-interface-checker@0.1.13": { "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==" }, + "undici-types@6.19.8": { + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "update-browserslist-db@1.1.1_browserslist@4.24.2": { "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dependencies": [ @@ -1101,10 +1112,91 @@ } }, "redirects": { + "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", "https://deno.land/x/cors/mod.ts": "https://deno.land/x/cors@v1.2.2/mod.ts", - "https://deno.land/x/oak/mod.ts": "https://deno.land/x/oak@v17.1.2/mod.ts" + "https://deno.land/x/oak/mod.ts": "https://deno.land/x/oak@v17.1.2/mod.ts", + "https://deno.land/x/sqlite/mod.ts": "https://deno.land/x/sqlite@v3.9.1/mod.ts" }, "remote": { + "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", + "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", + "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", + "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", + "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", + "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", + "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", + "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", + "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", + "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", + "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", + "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", + "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", + "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", + "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", + "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", + "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", "https://deno.land/x/cors@v1.2.2/abcCors.ts": "cdf83a7eaa69a1bf3ab910d18b9422217902fac47601adcaf0afac5a61845d48", "https://deno.land/x/cors@v1.2.2/attainCors.ts": "7d6aba0f942495cc31119604e0895c9bb8edd8f8baa7fe78e6c655bd0b4cbf59", "https://deno.land/x/cors@v1.2.2/cors.ts": "0e2d9167e3685f9bcf48f565e312b6e1883fa458f7337e5ce7bc2e3b29767980", @@ -1141,7 +1233,24 @@ "https://deno.land/x/oak@v17.1.2/utils/encode_url.ts": "c0ed6b318eb9523adeebba32eb9acd059c0f94d3511b2b9e3b024722d1b3dfb8", "https://deno.land/x/oak@v17.1.2/utils/resolve_path.ts": "aa39d54a003b38fee55f340a0cba3f93a7af85b8ddd5fbfb049a98fc0109b36d", "https://deno.land/x/oak@v17.1.2/utils/streams.ts": "3da73b94681f8d27a82cc67df3f91090ec0bd6c3e9ab957af588d41ab585d923", - "https://deno.land/x/oak@v17.1.2/utils/type_guards.ts": "a8dbb5ab7424f0355b121537d2454f927e0ca9949262fb67ac4fbefbd5880313" + "https://deno.land/x/oak@v17.1.2/utils/type_guards.ts": "a8dbb5ab7424f0355b121537d2454f927e0ca9949262fb67ac4fbefbd5880313", + "https://deno.land/x/sqlite@v3.2.0/build/sqlite.js": "16fe819f3b40c0d2e100014ec922b7dcef32bc9a0c799a9ecd4f1ae104217c88", + "https://deno.land/x/sqlite@v3.2.0/build/vfs.js": "baff72655c0916c906327fe6703c6a47daa1346e55c2eaa2629bcd879a673c8d", + "https://deno.land/x/sqlite@v3.2.0/mod.ts": "0b3e066f61a149d5aa99a50e2c41c687eaa0713350d3e9bfbe4025173ec1c9a9", + "https://deno.land/x/sqlite@v3.2.0/src/constants.ts": "b967237b460fafa03ca03aeddb33953bed41c7cbdc309a934e2329a5c84079ac", + "https://deno.land/x/sqlite@v3.2.0/src/db.ts": "51e39293ba03679a779719a32fca503b3d8728f366762b4f7fb9fd8974985ab8", + "https://deno.land/x/sqlite@v3.2.0/src/error.ts": "6b0e5e8e5b60c928ab5b125a0801074445fbe40b20de87c95ca15f4b88592faf", + "https://deno.land/x/sqlite@v3.2.0/src/query.ts": "ad41895ceb1585a4f67b4cf836a3106d9be8957bf00ec48a056638026286f9b0", + "https://deno.land/x/sqlite@v3.2.0/src/wasm.ts": "e79d0baa6e42423257fb3c7cc98091c54399254867e0f34a09b5bdef37bd9487", + "https://deno.land/x/sqlite@v3.9.1/build/sqlite.js": "2afc7875c7b9c85d89730c4a311ab3a304e5d1bf761fbadd8c07bbdf130f5f9b", + "https://deno.land/x/sqlite@v3.9.1/build/vfs.js": "7f7778a9fe499cd10738d6e43867340b50b67d3e39142b0065acd51a84cd2e03", + "https://deno.land/x/sqlite@v3.9.1/mod.ts": "e09fc79d8065fe222578114b109b1fd60077bff1bb75448532077f784f4d6a83", + "https://deno.land/x/sqlite@v3.9.1/src/constants.ts": "90f3be047ec0a89bcb5d6fc30db121685fc82cb00b1c476124ff47a4b0472aa9", + "https://deno.land/x/sqlite@v3.9.1/src/db.ts": "03d0c860957496eadedd86e51a6e650670764630e64f56df0092e86c90752401", + "https://deno.land/x/sqlite@v3.9.1/src/error.ts": "f7a15cb00d7c3797da1aefee3cf86d23e0ae92e73f0ba3165496c3816ab9503a", + "https://deno.land/x/sqlite@v3.9.1/src/function.ts": "bc778cab7a6d771f690afa27264c524d22fcb96f1bb61959ade7922c15a4ab8d", + "https://deno.land/x/sqlite@v3.9.1/src/query.ts": "d58abda928f6582d77bad685ecf551b1be8a15e8e38403e293ec38522e030cad", + "https://deno.land/x/sqlite@v3.9.1/src/wasm.ts": "e79d0baa6e42423257fb3c7cc98091c54399254867e0f34a09b5bdef37bd9487" }, "workspace": { "dependencies": [ diff --git a/src/main.ts b/src/main.ts index 9e28db8..a4ec937 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,8 @@ import './assets/main.css'; import { createApp } from 'vue'; +// @ts-ignore: import App from '../src/App.vue'; -// @ts-ignore +// @ts-ignore: import router from "./router/index.ts"; const app = createApp(App);