Hello! Although I did start on Occasionly, and have read-only CalDAV access setup, most changes were in zyn this week... it's so much fun to refine it, make the API nicer, and in general sand it.
But I have a CalDAV server syncing events!
In zyn I simplified routing, making actions less messy:
pub fn delete(action: *zyn.Action) !zyn.Response {
const user_session_id = try action.cookies.encrypted.get(
authentication.user_session_cookie_name,
);
if (user_session_id) |id| {
try action.db.exec("DELETE FROM user_sessions WHERE id = $1", .{id});
}
try action.cookies.encrypted.delete(authentication.user_session_cookie_name, .{});
return .redirect(.see_other, "/login");
}And added a bunch of HTTP "stuff" (CSRF, caching, different renderers, authorization challenges), database seeds, and probably my favourite for local development — TLS on localhost.
It relies on Caddy behind the scenes, and if it's installed you're off to the races with https://localhost:7532, and no elaborate setup. Apple Calendar requires secure DAV servers, so this makes testing much easier.
And then some documentation, served via zyn of course:
I fuckin' love AI.
Until next Thursday!
- Nick