Hayden Hargreaves d29426290d (FEAT): Created engagement buttons, and wired most of them up!
The make button is pretty much done, just need to finish up by
rate limiting it. That will take place in the engagement repository.

Sharing works as well, just a UI change, there is no backend yet, maybe
there should be an engagement type for sharing recipes. But not totally
sure.

The viewing is also in a semi-working state. It does not create requests
for users that aren't signed in, which needs to come. With that update
there is a need to update HOW the requests come in, we don't need it
every time we load the page. Maybe just when we click to it, from
somewhere else?

Finally, the favoriting does not totally work. The entry into the
engagement table is complete, but the actual favorites table, favorite
creation, button toggling AND button rendering is not implemented yet.
2025-07-14 21:00:28 -07:00

35 lines
1.2 KiB
Go

package domain
// Sub-routes
const VERSION = "/v1"
const WEB = "/web"
const API = "/api"
const STATE = "/state"
// Web prefixed routes
const WEB_LOGIN = VERSION + WEB + "/login"
const WEB_INDEX = VERSION + WEB
const WEB_HOME = VERSION + WEB + "/home"
const WEB_FAVORITES = VERSION + WEB + "/favorites"
const WEB_CREATE = VERSION + WEB + "/create"
const WEB_PROFIlE = VERSION + WEB + "/profile"
const WEB_LIST = VERSION + WEB + "/list"
const WEB_RECIPE = VERSION + WEB + "/recipe/%d"
const WEB_SEARCH = VERSION + WEB + "/search"
const WEB_NOT_FOUND = VERSION + WEB + "/404"
// API prefixed routes
const API_AUTH_LOGIN = VERSION + API + "/auth/login"
const API_AUTH_CALLBACK = VERSION + API + "/auth/callback"
const API_AUTH_LOGOUT = VERSION + API + "/auth/logout"
const API_CREATE_RECIPE = VERSION + API + "/recipe"
const API_SEARCH_RECIPES = VERSION + API + "/recipe/search"
const API_ENGAGEMENT_VIEW = VERSION + API + "/engagement/view/%d"
const API_ENGAGEMENT_LIKE = VERSION + API + "/engagement/like/%d"
const API_ENGAGEMENT_MAKE = VERSION + API + "/engagement/make/%d"
// State prefixed routes
const STATE_TAGS_CREATE = VERSION + WEB + STATE + "/tags"
const STATE_TAGS_DELETE = VERSION + WEB + STATE + "/tags/delete"