1
0

Add empty avatar provider (#149)

Fix lint

Add docs for avatar configuration

Add default avatar provider

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/149
This commit is contained in:
konrad
2020-03-01 21:10:25 +00:00
parent 584e3af237
commit cdd068cdb6
6 changed files with 80 additions and 10 deletions

View File

@ -46,7 +46,6 @@ const (
ServiceEnableTaskAttachments Key = `service.enabletaskattachments`
ServiceTimeZone Key = `service.timezone`
ServiceEnableTaskComments Key = `service.enabletaskcomments`
ServiceGravatarExpiration Key = `service.gravatarexpiration`
DatabaseType Key = `database.type`
DatabaseHost Key = `database.host`
@ -103,6 +102,9 @@ const (
CorsEnable Key = `cors.enable`
CorsOrigins Key = `cors.origins`
CorsMaxAge Key = `cors.maxage`
AvatarProvider Key = `avatar.provider`
AvatarGravaterExpiration Key = `avatar.gravatarexpiration`
)
// GetString returns a string config value
@ -174,7 +176,6 @@ func InitDefaultConfig() {
ServiceEnableTaskAttachments.setDefault(true)
ServiceTimeZone.setDefault("GMT")
ServiceEnableTaskComments.setDefault(true)
ServiceGravatarExpiration.setDefault(3600)
// Database
DatabaseType.setDefault("sqlite")
@ -230,6 +231,9 @@ func InitDefaultConfig() {
CorsMaxAge.setDefault(0)
// Migration
MigrationWunderlistEnable.setDefault(false)
// Avatar
AvatarProvider.setDefault("gravatar")
AvatarGravaterExpiration.setDefault(3600)
}
// InitConfig initializes the config, sets defaults etc.