示例#1
0
func ConfigReviewHandler(router *mux.Router) {
	router.HandleFunc("/register", handleReviewRegister)
	router.HandleFunc("/login", handleReviewLogin)
	router.HandleFunc("/logout", public.AuthReviewerVerifyWrapper(handleReviewerLogout))
	router.HandleFunc("/profile", public.AuthReviewerVerifyWrapper(handleReviewerProfile))

	router.HandleFunc("/app",
		public.AuthReviewerVerifyWrapper(handleGetReviewApplications))
	router.HandleFunc("/app/{appHash}",
		public.AuthReviewerVerifyWrapper(public.RequestMethodGuard(handleSubmitReview, "post", "put")))

	router.HandleFunc("/recomm/{recommHash}",
		public.AuthReviewerVerifyWrapper(public.RequestMethodGuard(handleReviewerRecommView, "get")))
}
示例#2
0
func ConfigFormHandler(router *mux.Router) {
	router.HandleFunc("/submit", public.AuthUserVerifierWrapper(handleFormSubmit))
	router.HandleFunc("/upload", public.AuthUserVerifierWrapper(handleFormFileUpload))
	router.HandleFunc("/view", public.AuthUserVerifierWrapper(handleFormView))

	router.HandleFunc("/recomm/{hash}", handleRecommendation)
	router.HandleFunc("/recomm/{hash}/upload", public.RequestMethodGuard(handleRecommendationUpload, "post", "put"))
}