From 3baea0e943ef89c7c73a5de51cbd41f78f8f0f14 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 28 Dec 2020 13:20:35 +0530 Subject: add redis integration --- .direnv/flake-profile | 2 +- .direnv/flake-profile.rc | 8 +++---- backend/Cargo.lock | 52 ++++++++++++++++++++++++++++++++++--------- backend/Cargo.toml | 1 + backend/src/handlers/users.rs | 12 ++++++++++ flake.nix | 1 + 6 files changed, 61 insertions(+), 15 deletions(-) diff --git a/.direnv/flake-profile b/.direnv/flake-profile index 3acfcc6..1dae299 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -/nix/store/ck72qhxrnv0z2nahfid0f8nk8q9d92pl-furby-env \ No newline at end of file +/nix/store/4y6ngfgs0vzg0vq9i9wxjn6wlqqgj967-furby-env \ No newline at end of file diff --git a/.direnv/flake-profile.rc b/.direnv/flake-profile.rc index cc4e338..dcd977e 100644 --- a/.direnv/flake-profile.rc +++ b/.direnv/flake-profile.rc @@ -16,7 +16,7 @@ export DETERMINISTIC_BUILD DIRSTACK=() GROUPS=() HOSTTYPE=x86_64 -HOST_PATH=/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin +HOST_PATH=/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/jnbp9d1h3fk2in8xc5rcv06kqnbhy2jl-redis-5.0.7/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin export HOST_PATH IFS=$' \t\n' IN_NIX_SHELL=impure @@ -57,7 +57,7 @@ export OBJDUMP OPTERR=1 OPTIND=1 OSTYPE=linux-gnu -PATH=/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9/bin:/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0/bin:/nix/store/b3zsk4ihlpiimv3vff86bb5bxghgdzb9-gcc-9.2.0/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1/bin:/nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin +PATH=/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9/bin:/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0/bin:/nix/store/b3zsk4ihlpiimv3vff86bb5bxghgdzb9-gcc-9.2.0/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1/bin:/nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/jnbp9d1h3fk2in8xc5rcv06kqnbhy2jl-redis-5.0.7/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin export PATH PIPESTATUS=([0]="0") PKG_CONFIG_PATH=/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev/lib/pkgconfig:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/pkgconfig:/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev/lib/pkgconfig:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/lib/pkgconfig:/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev/lib/pkgconfig:/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev/lib/pkgconfig:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/lib/pkgconfig:/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev/lib/pkgconfig:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/lib/pkgconfig @@ -84,7 +84,7 @@ export STRINGS STRIP=strip export STRIP _=export -buildInputs='/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1 /nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1 /nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3 /nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3 /nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1 /nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2 /nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2 /nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0 /nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84 /nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2 /nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev /nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0 /nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev /nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0 /nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5 /nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev /nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6' +buildInputs='/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1 /nix/store/jnbp9d1h3fk2in8xc5rcv06kqnbhy2jl-redis-5.0.7 /nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1 /nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3 /nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3 /nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1 /nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2 /nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2 /nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0 /nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84 /nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2 /nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev /nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0 /nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev /nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0 /nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5 /nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev /nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6' export buildInputs builder=/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin/bash export builder @@ -141,7 +141,7 @@ patches= export patches pkg=/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0 pkgsBuildHost=([0]="/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9" [1]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [2]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [3]="/nix/store/rvg5a5nwa7cihpmbzlwzh931w3g4q108-compress-man-pages.sh" [4]="/nix/store/4ygqr4w06zwcd2kcxa6w3441jijv0pvx-strip.sh" [5]="/nix/store/g6hzqyjd3ricwbs0bbx4806fiwg15vnc-patch-shebangs.sh" [6]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [7]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [8]="/nix/store/aknix5zw9cj7hd1m3h1d6nnmncl1vkvn-multiple-outputs.sh" [9]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [10]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [11]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [12]="/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0" [13]="/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1") -pkgsHostTarget=([0]="/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1" [1]="/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1" [2]="/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3" [3]="/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3" [4]="/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1" [5]="/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2" [6]="/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2" [7]="/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0" [8]="/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84" [9]="/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2" [10]="/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev" [11]="/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin" [12]="/nix/store/0x3bf23q5lmdq77x5icr7c0ngvz25ms3-openssl-1.1.1g" [13]="/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0" [14]="/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2" [15]="/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16" [16]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [17]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [18]="/nix/store/a6xvh7znlpdipwyncxz44sprfbvg15fa-python3.7-requests-2.22.0" [19]="/nix/store/7jlkn8dz8gsv3h18sr772x3v9n9ac10i-python3.7-urllib3-1.25.8" [20]="/nix/store/qyp3bcn7qq5lryqimd1ddlbbmd6r57zr-python3.7-pyOpenSSL-19.1.0-dev" [21]="/nix/store/pb90x5cn1znp2hpb8jdgnlamv9qwg7za-python3.7-cryptography-2.8-dev" [22]="/nix/store/0bngdpmsypycaqcgs4jwxvnpzvgw68sn-python3.7-packaging-20.1" [23]="/nix/store/4cv3k9hb741kq5f161pvzlfmnx0198sx-python3.7-pyparsing-2.4.6" [24]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [25]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [26]="/nix/store/awck465fagj1rl9xgvfg9dnclw8i4w04-python3.7-cffi-1.13.2-dev" [27]="/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev" [28]="/nix/store/j2fdy70n25zaws892dc95yhj0gfhdxg6-libffi-3.3" [29]="/nix/store/j35bi1s8azhbvcmalmmjfaxp1w1y3k6y-python3.7-pycparser-2.19" [30]="/nix/store/8wz0jhcc13q3j5cx54fkg0n95s4srr8q-python3.7-cffi-1.13.2" [31]="/nix/store/j120qpj9y4hnhch85mxy20hjzc4nfi33-python3.7-cryptography-2.8" [32]="/nix/store/faga777zw6vbvm3n63c7kyvwzzlvpikn-python3.7-pyasn1-0.4.8" [33]="/nix/store/py5py6kkf8yc3284i6v1zh1lraym2nr4-python3.7-idna-2.8" [34]="/nix/store/2qjbjrhx2lqh8jj2r5f40b46y54ic0zk-python3.7-pyOpenSSL-19.1.0" [35]="/nix/store/wmy1bka21pkcvfj24rdp883yvf12fkhs-python3.7-certifi-2019.11.28" [36]="/nix/store/zalgg8wkgnsda8l88n64wzdpmgrf5sd1-python3.7-pysocks-1.7.1" [37]="/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4" [38]="/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0" [39]="/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev" [40]="/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev" [41]="/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin" [42]="/nix/store/qkpfyg67ff3c0wjsy68a61rx01f1cc31-nghttp2-1.40.0-lib" [43]="/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev" [44]="/nix/store/msp4hm62a75pdidlc3s2ymma2g5hsjjk-zlib-1.2.11" [45]="/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev" [46]="/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17" [47]="/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev" [48]="/nix/store/fnn6zvyds5sy7mgvl4h2qslmlsaf0dc8-libssh2-1.9.0" [49]="/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin" [50]="/nix/store/bcqgqdzmhd9smr51snjcy2q2cbrwy47j-curl-7.70.0" [51]="/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0" [52]="/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5" [53]="/nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev" [54]="/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin" [55]="/nix/store/7cj4dviicvhga78l899arar4q5kggbc5-jq-1.6-lib") +pkgsHostTarget=([0]="/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1" [1]="/nix/store/jnbp9d1h3fk2in8xc5rcv06kqnbhy2jl-redis-5.0.7" [2]="/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1" [3]="/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3" [4]="/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3" [5]="/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1" [6]="/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2" [7]="/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2" [8]="/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0" [9]="/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84" [10]="/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2" [11]="/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev" [12]="/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin" [13]="/nix/store/0x3bf23q5lmdq77x5icr7c0ngvz25ms3-openssl-1.1.1g" [14]="/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0" [15]="/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2" [16]="/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16" [17]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [18]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [19]="/nix/store/a6xvh7znlpdipwyncxz44sprfbvg15fa-python3.7-requests-2.22.0" [20]="/nix/store/7jlkn8dz8gsv3h18sr772x3v9n9ac10i-python3.7-urllib3-1.25.8" [21]="/nix/store/qyp3bcn7qq5lryqimd1ddlbbmd6r57zr-python3.7-pyOpenSSL-19.1.0-dev" [22]="/nix/store/pb90x5cn1znp2hpb8jdgnlamv9qwg7za-python3.7-cryptography-2.8-dev" [23]="/nix/store/0bngdpmsypycaqcgs4jwxvnpzvgw68sn-python3.7-packaging-20.1" [24]="/nix/store/4cv3k9hb741kq5f161pvzlfmnx0198sx-python3.7-pyparsing-2.4.6" [25]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [26]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [27]="/nix/store/awck465fagj1rl9xgvfg9dnclw8i4w04-python3.7-cffi-1.13.2-dev" [28]="/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev" [29]="/nix/store/j2fdy70n25zaws892dc95yhj0gfhdxg6-libffi-3.3" [30]="/nix/store/j35bi1s8azhbvcmalmmjfaxp1w1y3k6y-python3.7-pycparser-2.19" [31]="/nix/store/8wz0jhcc13q3j5cx54fkg0n95s4srr8q-python3.7-cffi-1.13.2" [32]="/nix/store/j120qpj9y4hnhch85mxy20hjzc4nfi33-python3.7-cryptography-2.8" [33]="/nix/store/faga777zw6vbvm3n63c7kyvwzzlvpikn-python3.7-pyasn1-0.4.8" [34]="/nix/store/py5py6kkf8yc3284i6v1zh1lraym2nr4-python3.7-idna-2.8" [35]="/nix/store/2qjbjrhx2lqh8jj2r5f40b46y54ic0zk-python3.7-pyOpenSSL-19.1.0" [36]="/nix/store/wmy1bka21pkcvfj24rdp883yvf12fkhs-python3.7-certifi-2019.11.28" [37]="/nix/store/zalgg8wkgnsda8l88n64wzdpmgrf5sd1-python3.7-pysocks-1.7.1" [38]="/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4" [39]="/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0" [40]="/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev" [41]="/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev" [42]="/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin" [43]="/nix/store/qkpfyg67ff3c0wjsy68a61rx01f1cc31-nghttp2-1.40.0-lib" [44]="/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev" [45]="/nix/store/msp4hm62a75pdidlc3s2ymma2g5hsjjk-zlib-1.2.11" [46]="/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev" [47]="/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17" [48]="/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev" [49]="/nix/store/fnn6zvyds5sy7mgvl4h2qslmlsaf0dc8-libssh2-1.9.0" [50]="/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin" [51]="/nix/store/bcqgqdzmhd9smr51snjcy2q2cbrwy47j-curl-7.70.0" [52]="/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0" [53]="/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5" [54]="/nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev" [55]="/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin" [56]="/nix/store/7cj4dviicvhga78l899arar4q5kggbc5-jq-1.6-lib") postFixupHooks=([0]="_multioutPropagateDev") postUnpackHooks=([0]="_updateSourceDateEpochFromSourceRoot") preConfigureHooks=([0]="_multioutConfig") diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 2f6aaaa..d309a66 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -7,7 +7,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" dependencies = [ "bitflags", - "bytes", + "bytes 0.5.6", "futures-core", "futures-sink", "log", @@ -64,7 +64,7 @@ dependencies = [ "base64", "bitflags", "brotli2", - "bytes", + "bytes 0.5.6", "cookie", "copyless", "derive_more", @@ -229,7 +229,7 @@ dependencies = [ "actix-rt", "actix-service", "bitflags", - "bytes", + "bytes 0.5.6", "either", "futures-channel", "futures-sink", @@ -258,7 +258,7 @@ dependencies = [ "actix-utils", "actix-web-codegen", "awc", - "bytes", + "bytes 0.5.6", "derive_more", "encoding_rs", "futures-channel", @@ -412,7 +412,7 @@ dependencies = [ "actix-rt", "actix-service", "base64", - "bytes", + "bytes 0.5.6", "derive_more", "futures-core", "log", @@ -566,13 +566,19 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +[[package]] +name = "bytes" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" + [[package]] name = "bytestring" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7c05fa5172da78a62d9949d662d2ac89d4cc7355d7b49adee5163f1fb3f363" dependencies = [ - "bytes", + "bytes 0.5.6", ] [[package]] @@ -610,6 +616,16 @@ dependencies = [ "bitflags", ] +[[package]] +name = "combine" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01199925a18b00193570e3d70cfe57dcb647eb167c29851983e76fc39e2fee39" +dependencies = [ + "bytes 1.0.0", + "memchr", +] + [[package]] name = "const_fn" version = "0.4.2" @@ -813,6 +829,7 @@ dependencies = [ "log", "pretty_env_logger", "rand", + "redis", "serde", "serde_derive", "serde_json", @@ -952,7 +969,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" dependencies = [ - "bytes", + "bytes 0.5.6", "fnv", "futures-core", "futures-sink", @@ -1026,7 +1043,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" dependencies = [ - "bytes", + "bytes 0.5.6", "fnv", "itoa", ] @@ -1546,6 +1563,21 @@ dependencies = [ "rand_core", ] +[[package]] +name = "redis" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a6ddfecac9391fed21cce10e83c65fa4abafd77df05c98b1c647c65374ce9b3" +dependencies = [ + "async-trait", + "combine", + "dtoa", + "itoa", + "percent-encoding 2.1.0", + "sha1", + "url 2.1.1", +] + [[package]] name = "redox_syscall" version = "0.1.57" @@ -1938,7 +1970,7 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" dependencies = [ - "bytes", + "bytes 0.5.6", "futures-core", "iovec", "lazy_static", @@ -1958,7 +1990,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ - "bytes", + "bytes 0.5.6", "futures-core", "futures-sink", "log", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 8ce728b..fad11b0 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -18,6 +18,7 @@ actix-identity = "0.3.1" actix-cors = "0.5" bigdecimal = "0.0.14" rand = "0.7" +redis = "0.19" [dependencies.diesel] version = "1.4.2" diff --git a/backend/src/handlers/users.rs b/backend/src/handlers/users.rs index 8423384..775635e 100644 --- a/backend/src/handlers/users.rs +++ b/backend/src/handlers/users.rs @@ -9,6 +9,7 @@ use actix_web::{web, HttpResponse, Responder}; use bcrypt::{hash, verify, DEFAULT_COST}; use diesel::prelude::*; use log::{error, info}; +use redis::Commands; use serde::{Deserialize, Serialize}; pub async fn new_user( @@ -74,6 +75,14 @@ pub async fn login( let hashed_pass = selected_user.password; if verify(entered_pass, &hashed_pass).unwrap() { cookie.remember(login_details.username.clone()); + let redis_client = redis::Client::open("redis://127.0.0.1/").unwrap(); + let mut redis_conn = redis_client.get_connection().unwrap(); + redis_conn + .set::( + login_details.username.clone(), + cookie.identity().unwrap(), + ) + .unwrap(); info!( "Successful login: {} {}", selected_user.username, selected_user.email_id @@ -85,6 +94,9 @@ pub async fn login( } pub async fn logout(cookie: Identity) -> impl Responder { + let redis_client = redis::Client::open("redis://127.0.0.1/").unwrap(); + let mut redis_conn = redis_client.get_connection().unwrap(); + redis_conn.del::(cookie.identity().unwrap()); cookie.forget(); HttpResponse::Ok().body("Successful logout.") } diff --git a/flake.nix b/flake.nix index f5843e0..22f573f 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ src = "./."; buildInputs = [ tokei + redis ] ++ frontendPackages ++ backendPackages; }; }; -- cgit v1.2.3