mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 04:09:29 +02:00
parent
bab1204db4
commit
dba5d82f86
6 changed files with 94 additions and 0 deletions
|
@ -60,3 +60,21 @@ func GetGeneralRepoSettings(ctx *context.APIContext) {
|
|||
HTTPGitDisabled: setting.Repository.DisableHTTPGit,
|
||||
})
|
||||
}
|
||||
|
||||
// GetGeneralAttachmentSettings returns instance's global settings for Attachment
|
||||
func GetGeneralAttachmentSettings(ctx *context.APIContext) {
|
||||
// swagger:operation GET /settings/Attachment settings getGeneralAttachmentSettings
|
||||
// ---
|
||||
// summary: Get instance's global settings for Attachment
|
||||
// produces:
|
||||
// - application/json
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/GeneralAttachmentSettings"
|
||||
ctx.JSON(http.StatusOK, api.GeneralAttachmentSettings{
|
||||
Enabled: setting.Attachment.Enabled,
|
||||
AllowedTypes: setting.Attachment.AllowedTypes,
|
||||
MaxFiles: setting.Attachment.MaxFiles,
|
||||
MaxSize: setting.Attachment.MaxSize,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue