myPrayerJournal/src/public/request/cancel-snooze.php
Daniel J. Summers 20ad50928a Move files, complete PHP migration
The application works the same way as the F# version
2024-06-23 16:35:55 -04:00

18 lines
408 B
PHP

<?php declare(strict_types=1);
use BitBadger\PDODocument\RemoveFields;
use MyPrayerJournal\Table;
use MyPrayerJournal\UI\{Component, Layout};
require '../../start.php';
$req = validate_request($_GET['id'], ['PATCH'], false);
RemoveFields::byId(Table::REQUEST, $req->id, ['snoozedUntil']);
$req->snoozedUntil = null;
// TODO: message
Layout::bareHead();
Component::requestItem($req);
Layout::bareFoot();