You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
735 B
19 lines
735 B
package locations
|
|
|
|
import (
|
|
"github.com/dustinpianalto/quartermaster/pkg/utils"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func GetRouter() *mux.Router {
|
|
router := mux.NewRouter()
|
|
router.Handle("/", utils.AuthenticationMiddleware(locations))
|
|
router.Handle("/{id}/getChildren", utils.AuthenticationMiddleware(getChildren))
|
|
router.Handle("/{id}/items", utils.AuthenticationMiddleware(getItems))
|
|
router.Handle("/{id}/addItem/{item_id}", utils.AuthenticationMiddleware(addItem))
|
|
router.Handle("/{id}/removeItem/{item_id}", utils.AuthenticationMiddleware(removeItem))
|
|
router.Handle("/{id}/getItemCount/{item_id}", utils.AuthenticationMiddleware(getItemCount))
|
|
router.Handle("/{id}", utils.AuthenticationMiddleware(getLocation))
|
|
return router
|
|
}
|