fix: token reload

This commit is contained in:
Rogee
2024-12-15 01:19:03 +08:00
parent ed3d8b0e6c
commit 4a606bd824
9 changed files with 62 additions and 23 deletions

View File

@@ -85,7 +85,6 @@ func Serve(cmd *cobra.Command, args []string) error {
return c.SendFile(filepath.Join(
http.Storage.Path,
tenant,
"posters",
hash+".jpg",
))
})

View File

@@ -1,6 +1,8 @@
package tasks
import (
"errors"
"backend/modules/commands/discover"
"backend/modules/commands/store"
"backend/modules/medias"
@@ -56,6 +58,9 @@ func Command() atom.Option {
atom.RunE(func(cmd *cobra.Command, args []string) error {
return container.Container.Invoke(func(task *store.StoreMedias) error {
from := cmd.Flag("from").Value.String()
if from == "" {
return errors.New("from is empty")
}
return task.RunE(from)
})
}),