Commit graph

27 commits

Author SHA1 Message Date
f0fdd15473
use new import URL
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-02-17 19:42:48 +01:00
2426a8b393 turn into one route 2023-02-06 14:39:08 +00:00
ae488eb7d2 add ndr interface for handling dns reqs, add zonedir to config, add /save route to save zfs to zonedir, fix make local, and other small changes 2023-02-06 14:39:08 +00:00
295360fd05 swagger updates, moved structs and types into types.go, and made helpers.go for custom handlers 2023-02-01 19:41:38 -05: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
3e839fdf5f
fix(api): 401 on bad auth
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-01-31 19:09:17 +01:00
78671549c3 I <3 TESTS 2023-01-30 23:23:35 -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
6c709b97a1 add rate limiting 2023-01-20 18:29:33 -05:00
002787c1fc add logging to internal server error 2023-01-20 09:34:01 -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
16de4f0a43
I am stupid
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2023-01-19 15:41:29 +01:00
da5bd54b3e amended the Zone schema, fixed file upload size too small issue, refactoring, and zone file parsing works now 2023-01-09 18:19:07 +00:00
6e8f401e70 refactor, lint, refactor, lint, refactor, etc. Added config path for hashing secret, and a few other things 2023-01-09 18:19:07 +00:00
53e8d01cb9 handle file upload, create temp file, write that request made to DB using user/zone_file relation in DB, do other shit I forgot, linting 2023-01-09 18:19:07 +00: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
11692efdd1 small response stuff 2022-12-30 23:22:44 -05:00
f469d20e06 move files around, make sure cookies work, and add logout 2022-12-30 23:15:09 -05:00
c7893eb38e do the jwt shit 2022-12-30 21:48:01 -05:00
e4236f235f add gorm chi middleware and fix up create and login functions 2022-12-30 19:47:47 -05:00
3771eaedfd frontend :)
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-12-30 18:24:51 +00:00
93b9f23a25 handle incoming requests of zonefiles somewhat 2022-12-11 22:15:35 -05:00
2965700048 more auth stuff 2022-12-11 10:54:32 -05:00
06210317dd database thing 2022-12-11 01:57:53 -05:00
11e6900e1d switched from mux to Chi for way better auth middleware support, started building out auth flow, and a few other things 2022-12-11 01:10:02 -05:00
cd09dc190a initial commit 2022-12-02 21:15:49 -05:00