lint: format and lint
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { DB } from "https://deno.land/x/sqlite/mod.ts";
|
||||
import type { Note } from "./note"
|
||||
import type { Note } from "./note.ts";
|
||||
|
||||
export const db = new DB(Deno.env.get("SQLITE_PATH") ?? "notes.db");
|
||||
|
||||
export const upsertNote = async (note: Note) => {
|
||||
export const upsertNote = (note: Note) => {
|
||||
db.query(
|
||||
`
|
||||
INSERT INTO note (
|
||||
@@ -30,4 +30,4 @@ export const upsertNote = async (note: Note) => {
|
||||
note.rkey,
|
||||
],
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export type Note = {
|
||||
did: string
|
||||
rkey: string
|
||||
title: string
|
||||
content: string
|
||||
publishedAt: Date
|
||||
createdAt: Date
|
||||
}
|
||||
did: string;
|
||||
rkey: string;
|
||||
title: string;
|
||||
content: string;
|
||||
publishedAt: Date;
|
||||
createdAt: Date;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from "../data/db"
|
||||
import { db } from "../data/db";
|
||||
|
||||
db.execute(`
|
||||
CREATE TABLE IF NOT EXISTS note (
|
||||
@@ -12,4 +12,4 @@ db.execute(`
|
||||
);
|
||||
`);
|
||||
|
||||
db.close();
|
||||
db.close();
|
||||
|
||||
Reference in New Issue
Block a user