mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Implement POST /path?create=true for explicit repository creation
Legacy code which created repo on first "POST /keys/foo" remains, so restic clients <= v0.3.3 continue working.
This commit is contained in:
2
main.go
2
main.go
@@ -70,6 +70,8 @@ func setupMux() *goji.Mux {
|
||||
mux.HandleFunc(pat.Post("/:repo/:type/:name"), SaveBlob)
|
||||
mux.HandleFunc(pat.Delete("/:type/:name"), DeleteBlob)
|
||||
mux.HandleFunc(pat.Delete("/:repo/:type/:name"), DeleteBlob)
|
||||
mux.HandleFunc(pat.Post("/"), CreateRepo)
|
||||
mux.HandleFunc(pat.Post("/:repo"), CreateRepo)
|
||||
|
||||
return mux
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user