JKSDK,,KDS
This commit is contained in:
parent
81b51730d4
commit
ba39d648fd
@ -41,7 +41,17 @@ func RoutesProtected(r *mux.Router, db *gorm.DB) {
|
||||
r.HandleFunc("/test/send2", renders.TestMessagesPages2)
|
||||
r.HandleFunc("/admin/user/{id}/conversation-thread", renders.AdminConversationThread(db)).Methods("GET")
|
||||
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)
|
||||
})
|
||||
|
||||
|
||||
|
||||
// // Ici on place les vues et API qui doivent être protégées
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
<li><a href="/test/send">📤 Test envoi</a></li>
|
||||
<li><a href="/test/send2">📤 Test envoi template</a></li>
|
||||
{{ end }}
|
||||
<a href="/admin/user/{{ .User.ID }}/conversations">💬 Mes conversations</a>
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user