-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get records API route #178
base: master
Are you sure you want to change the base?
Conversation
case "", "application/json": | ||
contentType = "application/json" | ||
default: | ||
httpError(w, http.StatusBadRequest, `content type "`+accept+`" is not supported`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you not return here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is just sending an http response as json {"error": "message"}
with the status code given 😉
I'll get to authentication soon to merge that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point 🤣. I reviewed the rest, all seem alright to me. I learnt about Read Locks, it seemed weird to me to have to lock in order to read. Regarding authentication, a cool thing could be to make ddns-updater a microservice that implements oauth2. We could interface it with the user management interface we want, we wouldn't have to maintain user management. I'm personally using Authelia which has oauth2 in beta. There is also https://github.com/netlify/gotrue
23175ad
to
1a9cf0e
Compare
fd15083
to
5c166a6
Compare
bed663a
to
6a6b1a8
Compare
126315b
to
691ed32
Compare
/api/v1/records
Document API routes in readme for now. Maybe add swagger later ❓Working on a (Flutter 2) UI to consume it, that should be a first step to have a 'dynamic' new UI with the same features as the current one.