JKSDK,,KDS
This commit is contained in:
parent
81b51730d4
commit
ba39d648fd
@ -41,6 +41,16 @@ func RoutesProtected(r *mux.Router, db *gorm.DB) {
|
|||||||
r.HandleFunc("/test/send2", renders.TestMessagesPages2)
|
r.HandleFunc("/test/send2", renders.TestMessagesPages2)
|
||||||
r.HandleFunc("/admin/user/{id}/conversation-thread", renders.AdminConversationThread(db)).Methods("GET")
|
r.HandleFunc("/admin/user/{id}/conversation-thread", renders.AdminConversationThread(db)).Methods("GET")
|
||||||
r.HandleFunc("/api/message/send2", handlers.HandleTemplateTest(db)).Methods("POST")
|
r.HandleFunc("/api/message/send2", handlers.HandleTemplateTest(db)).Methods("POST")
|
||||||
|
r.HandleFunc("/logout", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.SetCookie(w, &http.Cookie{
|
||||||
|
Name: "token",
|
||||||
|
Value: "",
|
||||||
|
Path: "/",
|
||||||
|
MaxAge: -1,
|
||||||
|
HttpOnly: true,
|
||||||
|
})
|
||||||
|
http.Redirect(w, r, "/login", http.StatusSeeOther)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
<li><a href="/test/send">📤 Test envoi</a></li>
|
<li><a href="/test/send">📤 Test envoi</a></li>
|
||||||
<li><a href="/test/send2">📤 Test envoi template</a></li>
|
<li><a href="/test/send2">📤 Test envoi template</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<a href="/admin/user/{{ .User.ID }}/conversations">💬 Mes conversations</a>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user