mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add api for pinned resources
This commit is contained in:
@@ -48,7 +48,13 @@ func setServerConfig(c fiber.Ctx) error {
|
||||
return model.NewRequestError("Invalid request parameters")
|
||||
}
|
||||
|
||||
config.SetConfig(sc)
|
||||
if err := config.SetConfig(sc); err != nil {
|
||||
return model.NewInternalServerError("Failed to save configuration")
|
||||
}
|
||||
|
||||
if err := sc.Validate(); err != nil {
|
||||
return model.NewRequestError(err.Error())
|
||||
}
|
||||
|
||||
return c.JSON(model.Response[any]{
|
||||
Success: true,
|
||||
|
Reference in New Issue
Block a user