add reset button
parent
2a662396b7
commit
a2c2cd0e16
@ -0,0 +1,12 @@
|
|||||||
|
import { db } from '$lib/db/index.js'
|
||||||
|
import { current_stack, stacking_config } from '$lib/db/schema.js'
|
||||||
|
|
||||||
|
export const POST = async ({ request }) => {
|
||||||
|
const body = await request.json()
|
||||||
|
|
||||||
|
await db.update(current_stack).set({
|
||||||
|
stack: 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
return new Response()
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
import { db } from '$lib/db'
|
import { db } from '$lib/db'
|
||||||
|
|
||||||
export const load = async () => {
|
export const load = async () => {
|
||||||
|
const current_stack = await db.query.current_stack.findFirst()
|
||||||
|
|
||||||
const config = await db.query.stacking_config.findFirst()
|
const config = await db.query.stacking_config.findFirst()
|
||||||
return {
|
return {
|
||||||
|
current_stack,
|
||||||
config,
|
config,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue