Add delete functionality (#13)

This commit is contained in:
Tai Groot 2021-04-20 14:25:57 -07:00 committed by GitHub
parent 12afabdad2
commit 1d522cc054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 ...

View File

@ -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>