Commit graph

17 commits

Author SHA1 Message Date
ac3d8277a1 lets all love linting 2023-05-28 01:36:23 -04:00
64c43839de add log levels, method chaining, remove unused code 2023-05-28 01:19:19 -04:00
9d79f5e878 occam's razor moment 2023-03-07 21:24:37 +00:00
76e5144729 Merge pull request 'chore: make generic API errors and logging easier' (#42) from change-generics-again into master
Reviewed-on: https://git.freecumextremist.com/grumbulon/pomme/pulls/42
2023-02-28 15:48:52 +00:00
9892433e3c messed with les generics again 2023-02-28 00:45:57 -05:00
d168b52184 piss 2023-02-24 22:36:53 -05:00
5d52caab70
fix(backend): make cookie more strict
THIS IS STILL NOT ENOUGH!

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-20 18:05:09 +01:00
f0fdd15473
use new import URL
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-17 19:42:48 +01:00
9d87ae4728 internal.response doesn't includes http status, api tests use header status code now, new generic APIError function 2023-02-01 15:59:34 -05:00
277de26561 updated swagger docs to look more like Gitea, moved all structs to types.go, removed username from response struct, removed other unnecessary code 2023-02-01 00:36:17 -05:00
5e8ba819bc added read DB path from config, add DB paths to sample config, added render library for JSON responses, removed plaintext password from User struct, made error handler funcs return json and their calls to include http.Request, and made API tests use httptest server 2023-01-30 19:49:52 -05:00
a22ad3ec37 added a handler function for common stuff like 500 error, and changed the auth failure handler. Added error handling in a few places. Unexported setDBMiddleware handler 2023-01-19 23:56:38 -05:00
a3230fbc72 fix login oppsie, fix zonefile query to check filename and username, and linting 2023-01-09 18:19:07 +00:00
e363c83009 if already logged in return on login func and generate cookie for newly created users -- ensure all redirect to index 2023-01-09 18:19:07 +00:00
c005016cb2 adding error returns or else bad things happen and adding max cookie age of 1 hr 2023-01-05 19:15:15 -05:00
c3c533558f linted, added a custom web server definition with timeouts, added new type of context key, and added linting to the makefile 2022-12-31 10:05:20 -05:00
f469d20e06 move files around, make sure cookies work, and add logout 2022-12-30 23:15:09 -05:00