User can change a character from private to public and back
This commit is contained in:
@@ -10,6 +10,8 @@ func RegisterRoutes(r *gin.RouterGroup) {
|
||||
charGrp.POST("", CreateCharacter)
|
||||
charGrp.GET("/:id", GetCharacter)
|
||||
charGrp.PUT("/:id", UpdateCharacter)
|
||||
charGrp.PATCH("/:id", UpdateCharacter)
|
||||
|
||||
charGrp.DELETE("/:id", DeleteCharacter)
|
||||
charGrp.PUT("/:id/image", UpdateCharacterImage)
|
||||
charGrp.GET("/:id/datasheet-options", GetDatasheetOptions)
|
||||
|
||||
@@ -21,7 +21,7 @@ func SetupGin(r *gin.Engine) {
|
||||
r.Use(cors.New(cors.Config{
|
||||
//AllowOrigins: []string{"http://localhost:3000"}, // Replace with your frontend's URL
|
||||
AllowOrigins: allowedOrigins,
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type", "Authorization"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
|
||||
Reference in New Issue
Block a user