🐛 Fix delete file load config issue
This commit is contained in:
parent
ae6815b2a4
commit
66ee6c37f2
@ -94,12 +94,7 @@ func DeleteFile(meta models.Attachment) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var destMap map[string]any
|
||||
if meta.Destination == models.AttachmentDstTemporary {
|
||||
destMap = viper.GetStringMap("destinations.0")
|
||||
} else {
|
||||
destMap = viper.GetStringMap("destinations.permanent")
|
||||
}
|
||||
destMap := viper.GetStringMap(fmt.Sprintf("destinations.%d", meta.Destination))
|
||||
|
||||
var dest models.BaseDestination
|
||||
rawDest, _ := jsoniter.Marshal(destMap)
|
||||
|
Loading…
Reference in New Issue
Block a user