mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-21 01:23:40 +00:00
chore: auto-fix lint & formatting [skip ci]
This commit is contained in:
1 parent
a77ac8ad91
commit
df16dc94f7
17 files changed
+142
-125
No files matched your search
@@ -17,9 +17,7 @@ interface D1FragmentRow {
|
||||
|
||||
export async function loadFragments(db: D1Database): Promise<NamedFragment[]> {
|
||||
try {
|
||||
const stmt = db.prepare(
|
||||
"SELECT id, group_id, name, node FROM d1_fragments ORDER BY id",
|
||||
);
|
||||
const stmt = db.prepare("SELECT id, group_id, name, node FROM d1_fragments ORDER BY id");
|
||||
if (typeof stmt.all !== "function") return [];
|
||||
const { results } = await stmt.all<D1FragmentRow>();
|
||||
if (!results || results.length === 0) return [];
|
||||
@@ -35,10 +33,7 @@ export async function loadFragments(db: D1Database): Promise<NamedFragment[]> {
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveFragments(
|
||||
db: D1Database,
|
||||
fragments: NamedFragment[],
|
||||
): Promise<void> {
|
||||
export async function saveFragments(db: D1Database, fragments: NamedFragment[]): Promise<void> {
|
||||
const now = Date.now();
|
||||
const statements: D1PreparedStatement[] = [
|
||||
db.prepare("DELETE FROM d1_fragments"),
|
||||
|
||||
Reference in new issue
Block a user