Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 708726c4 authored by Akhil's avatar Akhil 🙂
Browse files

Add error string instead of errors

parent 829f6b79
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -41,17 +41,16 @@ class UserController extends ApiController
            return $response; 
        }
        
        $errors = [];
        $this->userService->setEmail($uid, $email);
        $this->userService->setQuota($uid, $quota);
        $createdFolder = $this->userService->createUserFolder($uid);

        if(!$createdFolder){ 
            $errors[] = 'error_creating_user_folder';
            $response->setStatus(500);
            $error = 'error_creating_user_folder';
            $response->setData(['error' => $error]);
        }

        $response->setData(['errors' => $errors]);
        
        return $response;
    }