From: Brendan Hansen Date: Fri, 6 Sep 2019 01:19:26 +0000 (-0500) Subject: bug fixes X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=b523bea07ec2571e6d7969fe051e5a896da1a7fd;p=codebox.git bug fixes --- diff --git a/.gitignore b/.gitignore index ca9a1b8..fa6efdd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.env .tup/ -.vscode/ \ No newline at end of file +.vscode/ +data/ \ No newline at end of file diff --git a/Tuprules.tup b/Tuprules.tup deleted file mode 100644 index 5cabe65..0000000 --- a/Tuprules.tup +++ /dev/null @@ -1,2 +0,0 @@ -: foreach *.coffee |> coffee -c -o %B.js %f |> %B.js -: foreach *.moon |> moonc %f |> %B.lua diff --git a/codebox/Tuprules.tup b/codebox/Tuprules.tup new file mode 100644 index 0000000..5cabe65 --- /dev/null +++ b/codebox/Tuprules.tup @@ -0,0 +1,2 @@ +: foreach *.coffee |> coffee -c -o %B.js %f |> %B.js +: foreach *.moon |> moonc %f |> %B.lua diff --git a/codebox/controllers/account/register.moon b/codebox/controllers/account/register.moon index 0f3bc6b..9c29596 100644 --- a/codebox/controllers/account/register.moon +++ b/codebox/controllers/account/register.moon @@ -17,9 +17,9 @@ make_controller @flow 'csrf_validate' assert_valid @params, { - { "username", exists: true, min_length: 2, matches_pattern: "%S+" } + { "username", exists: true, min_length: 2, matches_pattern: "^%w+$" } { "nickname", exists: true, min_length: 2 } - { "email", exists: true, min_length: 4, matches_pattern: "%S+@%S+%.%S+" } + { "email", exists: true, min_length: 4, matches_pattern: "^%S+@%S+%.%S+$" } { "password", exists: true, min_length: 2 } { "password_confirmation", exists: true, min_length: 2, equals: @params.password, 'Passwords must be the same' } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 195f128..ce1d1bd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -41,8 +41,12 @@ services: postgres: env_file: - config.env + environment: + PGDATA: /var/lib/postgresql/data/pgdata image: "postgres:12-alpine" restart: always + volumes: + - ./data:/var/lib/postgresql/data/pgdata networks: appnet: ipv4_address: 192.168.0.2 diff --git a/executer/Tuprules.tup b/executer/Tuprules.tup new file mode 100644 index 0000000..d3dceca --- /dev/null +++ b/executer/Tuprules.tup @@ -0,0 +1 @@ +: foreach *.coffee |> coffee -c -o %B.js %f |> %B.js \ No newline at end of file