fixed db path

for anyone reading past history, enjoy a free copy of my garbage-filled local dev db file
This commit is contained in:
axel 2025-04-12 00:22:05 +02:00
parent c27f956d64
commit b871cf08ab
2 changed files with 2 additions and 70 deletions

68
db.json
View File

@ -1,68 +0,0 @@
{
"users": [
{
"id": "EqWthpxM6dwLpdg6_GMNv",
"name": "admin",
"password": "$2b$10$M5f38oxNH2TbtJrSeR5bi.qgz9n5rhnxrQPh3Y.8GIZaH1Z6MgZDa",
"admin": true,
"groups": [],
"devices": [
"2PAUDI9gbzwuD8ptcptDM",
"A6u-0SaX5q5s_DzMFf3N1"
]
},
{
"id": "l6GVetq1ifjsHmnoy3TrC",
"name": "axel",
"admin": false,
"groups": [
"2Y1OFiRWu8r50_WBLaB-j"
],
"devices": [
"ps8lzN3c2uHcGtqHdmaEz"
],
"password": "$2b$10$MGb8xG3a4oxIvFq6fiqG8.X8HKS1j8WdjYjc6fgO6W.5s0vvQi8A."
}
],
"groups": [
{
"id": "2Y1OFiRWu8r50_WBLaB-j",
"name": "Gr1",
"devices": [
"2PAUDI9gbzwuD8ptcptDM",
"ps8lzN3c2uHcGtqHdmaEz"
]
},
{
"id": "gNaTU4Tdj-6-a8wRyWf21",
"name": "Gr2",
"devices": []
}
],
"devices": [
{
"id": "2PAUDI9gbzwuD8ptcptDM",
"name": "Dev1",
"mac": "00:00:00:00:00:00",
"broadcast": "255.255.255.254",
"port": 9,
"packets": 3
},
{
"id": "ps8lzN3c2uHcGtqHdmaEz",
"name": "Dev2",
"mac": "00:00:00:00:00:00",
"broadcast": "255.255.255.255",
"port": 9,
"packets": 3
},
{
"id": "A6u-0SaX5q5s_DzMFf3N1",
"name": "Dev3",
"mac": "00:00:00:00:00:00",
"broadcast": "255.255.255.255",
"port": 9,
"packets": 3
}
]
}

View File

@ -1,7 +1,7 @@
import { JSONFilePreset } from 'lowdb/node';
import type { Device } from './types/device';
import type { Group } from './types/group';
import type { User } from './types/user';
import type { Device } from './types/device';
type Data = {
users: User[];
@ -9,7 +9,7 @@ type Data = {
devices: Device[];
};
export const db = await JSONFilePreset<Data>('db.json', {
export const db = await JSONFilePreset<Data>('./data/db.json', {
users: [],
groups: [],
devices: [],