Auth: Rename "auth clear" command to "auth reset" for consistency #808

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-01-18 17:15:22 +01:00
parent 7e7ba69982
commit f767f6a1d9
2 changed files with 8 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ var AuthCommands = cli.Command{
AuthAddCommand,
AuthShowCommand,
AuthRemoveCommand,
AuthClearCommand,
AuthResetCommand,
},
}

View File

@@ -12,10 +12,10 @@ import (
"github.com/photoprism/photoprism/internal/entity"
)
// AuthClearCommand configures the command name, flags, and action.
var AuthClearCommand = cli.Command{
Name: "clear",
Usage: "Removes all registered sessions and access tokens",
// AuthResetCommand configures the command name, flags, and action.
var AuthResetCommand = cli.Command{
Name: "reset",
Usage: "Removes all registered user and client sessions",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "trace, t",
@@ -26,11 +26,11 @@ var AuthClearCommand = cli.Command{
Usage: "assume \"yes\" and run non-interactively",
},
},
Action: authClearAction,
Action: authResetAction,
}
// authClearAction removes all sessions and resets the storage to a clean state.
func authClearAction(ctx *cli.Context) error {
// authResetAction removes all sessions and resets the related database table to a clean state.
func authResetAction(ctx *cli.Context) error {
return CallWithDependencies(ctx, func(conf *config.Config) error {
confirmed := ctx.Bool("yes")