diff --git a/Dockerfile b/Dockerfile index d4dd83a..42324a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,6 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local RUN composer update && composer install RUN a2enmod rewrite RUN a2enmod actions -RUN service apache2 restart \ No newline at end of file +RUN service apache2 restart +RUN mkdir /home/hel/smartfit_hdd +RUN chmod 755 /home/hel/smartfit_hdd \ No newline at end of file diff --git a/app/routes.php b/app/routes.php index 3c46c40..56cd894 100644 --- a/app/routes.php +++ b/app/routes.php @@ -29,7 +29,7 @@ return function (App $app) { return $res->withStatus(400); } $code = (new UserGateway)->createUser($req_body['email'], $req_body['hash'], $req_body['username']); - if($code === -1) return $res->withStatus(500); + if($code === -1) return $res->withStatus(409); $res->getBody()->write(json_encode($code)); return $res;