fix(handlers): add HTTP redirect for API requests

- Implemented an HTTP redirect to a random URL in the HandleAPIRequest function, enhancing user experience by guiding users to the appropriate resource after processing their request.
This commit is contained in:
wood chen 2024-12-01 00:20:23 +08:00
parent 80d18f2b88
commit d6fd055cd5

View File

@ -136,6 +136,8 @@ func (h *Handlers) HandleAPIRequest(w http.ResponseWriter, r *http.Request) {
randomURL, randomURL,
) )
http.Redirect(w, r, randomURL, http.StatusFound)
done <- struct{}{} done <- struct{}{}
}() }()