add vote infra and ui prep for connection ui to backend

This commit is contained in:
2024-12-01 23:43:52 -07:00
parent a1a112ed11
commit 091e55fc2f
11 changed files with 197 additions and 31 deletions

View File

@ -57,6 +57,7 @@ func main() {
r.HandleFunc("/api/v1/shorten", s.ShortenLinkHandler).Methods("POST")
r.HandleFunc("/api/v1/comments", s.ListComments).Methods("GET")
r.HandleFunc("/api/v1/comment", s.AddComment).Methods("POST")
r.HandleFunc("/api/v1/vote", s.AddVote).Methods("POST")
r.HandleFunc("/x/{id}", s.ShortLinkHandler).Methods("GET")
c := cors.New(cors.Options{