Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa006bd committed Aug 7, 2023
1 parent 45a6557 commit 15370d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
7 changes: 1 addition & 6 deletions composables/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,11 @@ export const fetchGithubUser = async () => {
export const githubLogin = () => {
if (process.client) {
const { github } = useRuntimeConfig().public;
window.location.replace(
`https://github.com/login/oauth/authorize?client_id=${github.clientId}&scope=public_repo`
);

window.location.replace(`https://github.com/login/oauth/authorize?client_id=${github.clientId}&scope=public_repo`);
}
};

export const githubLogout = async () => {
useGithubCookie().value = null;
useState('gh_user').value = null;
};


4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"migrate": "drizzle-kit generate:sqlite",
"drop":"drizzle-kit drop",
"push-schema":"drizzle-kit push:sqlite",
"drop": "drizzle-kit drop",
"push-schema": "drizzle-kit push:sqlite",
"db-explorer": "drizzle-kit studio",
"clean": "rm -rf dist/ node_modules/ .eslintcache",
"check-format": "prettier --check .",
Expand Down
8 changes: 3 additions & 5 deletions server/utils/db.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { drizzle, BetterSQLite3Database, } from 'drizzle-orm/better-sqlite3';
import { migrate as _migrate } from "drizzle-orm/better-sqlite3/migrator";

import { drizzle, BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
import { migrate as _migrate } from 'drizzle-orm/better-sqlite3/migrator';

// @ts-ignore
import Database from 'better-sqlite3';

const sqlite = new Database(process.env.DATABASE_NAME ?? 'code_captain.db');


export const db: BetterSQLite3Database = drizzle(sqlite);

export async function migrate() {
await _migrate(db,{migrationsFolder:"./db/migrations"});
await _migrate(db, { migrationsFolder: './db/migrations' });
}

0 comments on commit 15370d4

Please sign in to comment.