user.name.constSlice(), user.display_name.constSlice(),
});
if (self.logged_in != null and user_id != self.logged_in.?.user.id) {
- if (try followers.has(self.logged_in.?.user.id)) {
+ const login = self.logged_in.?;
+
+ // follow/unfollow
+ if (try followers.has(login.user.id)) {
try html_form(self.res, "/follow", .{}, .{
.{ "type=\"hidden\" name=\"user_id\" value=\"{x}\"", .{@intFromEnum(user_id)} },
\\type="submit" value="Unfollow"
try self.res.write("<br />", .{});
}
}
- pub fn @"/list/"(self: Self, args: struct { list_id: PostListList.Index }) !void {
+ pub fn @"/list/"(self: Self, args: struct { list_id: PostList.Index }) !void {
try write_posts(self.res, self.txn, self.logged_in, PostList{ .idx = args.list_id });
}
pub fn @"/lists"(self: Self) !void {