fix: use correct name during init and use app name as provider

This commit is contained in:
Juan Pablo Villafáñez
2024-06-05 11:23:41 +02:00
parent 1f1b818056
commit 7360cd115e
3 changed files with 3 additions and 3 deletions

View File

@@ -162,7 +162,7 @@ type WopiApp struct {
}
type Collaboration struct {
WopiApp WopiApp `yaml:"wopiapp"`
WopiApp WopiApp `yaml:"wopi"`
}
type Nats struct {

View File

@@ -2,7 +2,7 @@ package config
// App defines the available app configuration.
type App struct {
Name string `yaml:"name" env:"COLLABORATION_APP_NAME" desc:"The name of the app" introductionVersion:"6.0.0"`
Name string `yaml:"name" env:"COLLABORATION_APP_NAME" desc:"The name of the app, either Collabora, OnlyOffice or Microsoft365" introductionVersion:"6.0.0"`
Description string `yaml:"description" env:"COLLABORATION_APP_DESCRIPTION" desc:"App description" introductionVersion:"6.0.0"`
Icon string `yaml:"icon" env:"COLLABORATION_APP_ICON" desc:"Icon for the app" introductionVersion:"6.0.0"`
LockName string `yaml:"lockname" env:"COLLABORATION_APP_LOCKNAME" desc:"Name for the app lock" introductionVersion:"6.0.0"`

View File

@@ -501,7 +501,7 @@ func (f *FileConnector) CheckFileInfo(ctx context.Context) (fileinfo.FileInfo, e
}
var info fileinfo.FileInfo
switch strings.ToLower(f.cfg.WopiApp.Provider) {
switch strings.ToLower(f.cfg.App.Name) {
case "collabora":
info = &fileinfo.Collabora{}
case "onlyoffice":