mirror of
https://github.com/Luzifer/ots.git
synced 2025-09-19 20:14:46 -04:00
[#92] Add detection for write-disabled instances
to deactivate secret creation for non-logged-in users Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f5aebbb99a
commit
805a005ed5
14 changed files with 108 additions and 1 deletions
1
api.go
1
api.go
|
@ -36,6 +36,7 @@ func newAPI(s storage) *apiServer {
|
|||
func (a apiServer) Register(r *mux.Router) {
|
||||
r.HandleFunc("/create", a.handleCreate)
|
||||
r.HandleFunc("/get/{id}", a.handleRead)
|
||||
r.HandleFunc("/isWritable", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusNoContent) })
|
||||
}
|
||||
|
||||
func (a apiServer) handleCreate(res http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue