mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
more formatting
This commit is contained in:
1 parent
046447b0fb
commit
f552c1212c
157 files changed
+635
-1579
No files matched your search
@@ -7,14 +7,12 @@ import { mainLogger } from './sv_logger';
|
||||
const notesLogger = mainLogger.child({ module: 'notes' });
|
||||
|
||||
async function addNote(identifier: string, note: Note): Promise<any> {
|
||||
const query =
|
||||
'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)';
|
||||
const query = 'INSERT INTO npwd_notes (identifier, title, content) VALUES (?, ?, ?)';
|
||||
await pool.query(query, [identifier, note.title, note.content]);
|
||||
}
|
||||
|
||||
async function fetchAllNotes(identifier: string): Promise<Note[]> {
|
||||
const query =
|
||||
'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC';
|
||||
const query = 'SELECT * FROM npwd_notes WHERE identifier = ? ORDER BY id DESC';
|
||||
const [result] = await pool.query(query, [identifier]);
|
||||
return <Note[]>result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user