mirror of
https://github.com/writefreely/writefreely
synced 2024-11-27 19:10:17 +00:00
Remove length restriction on other methods on /api/posts/{post}
This commit is contained in:
parent
94f12dfc29
commit
6e01bb7d94
1 changed files with 3 additions and 3 deletions
|
@ -160,9 +160,9 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
|
||||||
write.HandleFunc("/api/posts", handler.All(newPost)).Methods("POST")
|
write.HandleFunc("/api/posts", handler.All(newPost)).Methods("POST")
|
||||||
posts := write.PathPrefix("/api/posts/").Subrouter()
|
posts := write.PathPrefix("/api/posts/").Subrouter()
|
||||||
posts.HandleFunc("/{post:[a-zA-Z0-9]+}", handler.AllReader(fetchPost)).Methods("GET")
|
posts.HandleFunc("/{post:[a-zA-Z0-9]+}", handler.AllReader(fetchPost)).Methods("GET")
|
||||||
posts.HandleFunc("/{post:[a-zA-Z0-9]{10}}", handler.All(existingPost)).Methods("POST", "PUT")
|
posts.HandleFunc("/{post:[a-zA-Z0-9]+}", handler.All(existingPost)).Methods("POST", "PUT")
|
||||||
posts.HandleFunc("/{post:[a-zA-Z0-9]{10}}", handler.All(deletePost)).Methods("DELETE")
|
posts.HandleFunc("/{post:[a-zA-Z0-9]+}", handler.All(deletePost)).Methods("DELETE")
|
||||||
posts.HandleFunc("/{post:[a-zA-Z0-9]{10}}/{property}", handler.AllReader(fetchPostProperty)).Methods("GET")
|
posts.HandleFunc("/{post:[a-zA-Z0-9]+}/{property}", handler.AllReader(fetchPostProperty)).Methods("GET")
|
||||||
posts.HandleFunc("/claim", handler.All(addPost)).Methods("POST")
|
posts.HandleFunc("/claim", handler.All(addPost)).Methods("POST")
|
||||||
posts.HandleFunc("/disperse", handler.All(dispersePost)).Methods("POST")
|
posts.HandleFunc("/disperse", handler.All(dispersePost)).Methods("POST")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue