This basically marks the favorites page completed. Updating the recipe repository to allow the search function to accept a userId and favorites flag. This flag will toggle a "favorites only" search. Which can be used to replicate the same functionality from the search page in the favorites page. This later can serve as a baseline for updating to also work for activity search. I am starting to think an ORM is a good idea...I heard Gorm is good, but for now, there is a bit too much tech debt.
37 lines
1.3 KiB
Go
37 lines
1.3 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_SEARCH_FAVORITES = VERSION + API + "/recipe/search/favorites"
|
|
|
|
const API_ENGAGEMENT_VIEW = VERSION + API + "/engagement/view/%d"
|
|
const API_ENGAGEMENT_SHARE = VERSION + API + "/engagement/share/%d"
|
|
const API_ENGAGEMENT_FAVORITE = VERSION + API + "/engagement/favorite/%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"
|