Add delete functionality (#13)
This commit is contained in:
parent
12afabdad2
commit
1d522cc054
@ -295,7 +295,7 @@ func (s *Server) initRoutes() {
|
||||
s.router.DELETE("/p/:uuid", s.DeleteHandler())
|
||||
// Add alternate path since form actions don't support method=DELETE
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE
|
||||
s.router.POST("/p/:uuid/delete", s.DeleteHandler())
|
||||
s.router.POST("/delete/:uuid", s.DeleteHandler())
|
||||
}
|
||||
|
||||
// NewServer ...
|
||||
|
@ -16,7 +16,7 @@
|
||||
</a>
|
||||
<ul class="menu">
|
||||
<li class="menu-item">
|
||||
<form action="/p/{{.UUID}}/delete" method="POST">
|
||||
<form action="/delete/{{.UUID}}" method="POST">
|
||||
<button type="submit">
|
||||
<span href="#dropdowns">
|
||||
<i class="icon icon-delete"></i>
|
||||
|
Loading…
Reference in New Issue
Block a user