fix method
This commit is contained in:
9
main.go
9
main.go
@@ -57,8 +57,12 @@ func main() {
|
|||||||
mainGroup.POST("/users/:id/avatar", users.UploadAvatar)
|
mainGroup.POST("/users/:id/avatar", users.UploadAvatar)
|
||||||
mainGroup.DELETE("/users/:id", users.DeleteUser)
|
mainGroup.DELETE("/users/:id", users.DeleteUser)
|
||||||
mainGroup.PATCH("/users/:id", users.UpdateUser)
|
mainGroup.PATCH("/users/:id", users.UpdateUser)
|
||||||
mainGroup.GET("/users/organizations", users.GetOrganizations)
|
|
||||||
mainGroup.GET("/users/positions", users.GetPositions)
|
// Organizations
|
||||||
|
mainGroup.GET("/organizations", users.GetOrganizations)
|
||||||
|
|
||||||
|
// Positions
|
||||||
|
mainGroup.GET("/positions", users.GetPositions)
|
||||||
|
|
||||||
//Events
|
//Events
|
||||||
mainGroup.GET("/events", events.GetEvents)
|
mainGroup.GET("/events", events.GetEvents)
|
||||||
@@ -92,7 +96,6 @@ func main() {
|
|||||||
mainGroup.POST("/checkups", medical_information.CreateCheckup)
|
mainGroup.POST("/checkups", medical_information.CreateCheckup)
|
||||||
|
|
||||||
// Medical cards
|
// Medical cards
|
||||||
|
|
||||||
mainGroup.GET("/medical_cards", medical_information.GetMCList)
|
mainGroup.GET("/medical_cards", medical_information.GetMCList)
|
||||||
mainGroup.GET("/medical_cards/:id", medical_information.GetMC)
|
mainGroup.GET("/medical_cards/:id", medical_information.GetMC)
|
||||||
mainGroup.POST("/medical_cards", medical_information.CreateMC)
|
mainGroup.POST("/medical_cards", medical_information.CreateMC)
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ func GetRequest(url string, header http.Header, args ...string) ([]byte, error,
|
|||||||
|
|
||||||
func PatchRequest(url string, body io.Reader, header http.Header) ([]byte, error, *http.Response) {
|
func PatchRequest(url string, body io.Reader, header http.Header) ([]byte, error, *http.Response) {
|
||||||
client := http.Client{}
|
client := http.Client{}
|
||||||
req, err := http.NewRequest("POST", url, body)
|
req, err := http.NewRequest("PATCH", url, body)
|
||||||
req.Header = header
|
req.Header = header
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
|
|||||||
Reference in New Issue
Block a user