initial commit
This commit is contained in:
commit
803205ee7f
59 changed files with 3437 additions and 0 deletions
20
src/pages/event/questline/edit.astro
Normal file
20
src/pages/event/questline/edit.astro
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
export const prerender = false;
|
||||
export const partial = true;
|
||||
|
||||
import { Questline } from '../../../lib/Questline';
|
||||
|
||||
const id = Astro.url.searchParams.get('id');
|
||||
const form = await Astro.request.formData();
|
||||
const name = form.get("name") as string;
|
||||
const coinsReward = form.get("coinsReward") as string;
|
||||
|
||||
if (name) {
|
||||
Questline.db.query("update questlines set name=? where id=?").values(name, id)
|
||||
} else if (coinsReward) {
|
||||
Questline.db.query("update questlines set coins_reward=? where id=?").values(coinsReward, id)
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
{name ? name : coinsReward}
|
||||
Loading…
Add table
Add a link
Reference in a new issue