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

19 lines
519 B
PHP

<?php declare(strict_types=1);
use BitBadger\PDODocument\Patch;
use MyPrayerJournal\Table;
use MyPrayerJournal\UI\Component;
require '../../start.php';
$req = validate_request($_GET['id'], ['PATCH'], false);
$until = (new DateTimeImmutable($_PATCH['until'] . 'T00:00:00', new DateTimeZone($_REQUEST['time_zone'])))
->setTimezone(new DateTimeZone('Etc/UTC'));
Patch::byId(Table::REQUEST, $req->id, ['snoozedUntil' => $until->format('c')]);
// TODO: message
hide_modal('snooze');
Component::journal();