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())
|
s.router.DELETE("/p/:uuid", s.DeleteHandler())
|
||||||
// Add alternate path since form actions don't support method=DELETE
|
// Add alternate path since form actions don't support method=DELETE
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/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 ...
|
// NewServer ...
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<ul class="menu">
|
<ul class="menu">
|
||||||
<li class="menu-item">
|
<li class="menu-item">
|
||||||
<form action="/p/{{.UUID}}/delete" method="POST">
|
<form action="/delete/{{.UUID}}" method="POST">
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<span href="#dropdowns">
|
<span href="#dropdowns">
|
||||||
<i class="icon icon-delete"></i>
|
<i class="icon icon-delete"></i>
|
||||||
|
Loading…
Reference in New Issue
Block a user