package journal

import "net/http"

func (s *Server) RegisterRoutes(mux *http.ServeMux) {
	mux.HandleFunc("GET /", s.HandleEntries)
	mux.HandleFunc("GET /entry/new", s.HandleNewEntry)
	mux.HandleFunc("POST /entry/new", s.HandleSubmitNewEntry)
	mux.HandleFunc("POST /entry/delete", s.HandleDeleteEntryByID)
	mux.HandleFunc("GET /entry/{id}", s.HandleEntryByID)
	mux.HandleFunc("GET /entry/{id}/edit", s.HandleEditEntryByID)
	mux.HandleFunc("POST /entry/{id}/edit", s.HandleSubmitEditEntryByID)
	mux.HandleFunc("GET /entry/deleted", s.HandleDeletedEntry)
}
