-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pet-Supplies_Magdalena_and_Jonathan #33
base: main
Are you sure you want to change the base?
Conversation
@@ -7,8 +7,7 @@ export const action = async ({ request }) => { | |||
const body = form.get("body"); | |||
|
|||
const uuid = new Date().getTime().toString(16); | |||
db.data.posts.push({ id: uuid, title, body }); | |||
db.write(); | |||
v; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really bad
"description": "The smallest we have." | ||
}, | ||
{ | ||
"id": "2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more detailed data,
import path from "path"; | ||
import { JSONFileSync, LowSync } from "lowdb"; | ||
|
||
const file = path.join(__dirname, "../app/db/pet-supplies/db.json"); | ||
const adapter = new JSONFileSync(file); | ||
const db = new LowSync(adapter); | ||
|
||
db.read(); | ||
export default db; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job
No description provided.