Move validation

This commit is contained in:
Daniel Hougaard
2024-06-15 08:56:55 +02:00
parent cb237831c7
commit 1835777832
2 changed files with 3 additions and 6 deletions
+3
View File
@@ -176,6 +176,7 @@ func CreateFolder(params models.CreateFolderParameters) (models.SingleFolder, er
// If no token is provided, we will try to get the token from the current logged in user
if params.InfisicalToken == "" {
RequireLogin()
RequireLocalWorkspaceFile()
loggedInUserDetails, err := GetCurrentLoggedInUserDetails()
if err != nil {
@@ -221,6 +222,8 @@ func DeleteFolder(params models.DeleteFolderParameters) ([]models.SingleFolder,
// If no token is provided, we will try to get the token from the current logged in user
if params.InfisicalToken == "" {
RequireLogin()
RequireLocalWorkspaceFile()
loggedInUserDetails, err := GetCurrentLoggedInUserDetails()
if err != nil {