realaravinth
629c841e2d
chore: cleanup and addressing clippy lints
2022-05-27 18:37:59 +05:30
realaravinth
d7fd23f565
chore: get rid of direct DB init and use db_*
2022-05-27 18:25:27 +05:30
realaravinth
cd72ae6ffe
feat: migrate fetch captcha config to use db_*
2022-05-27 18:16:47 +05:30
realaravinth
a15d963c3e
feat: migrate get_levels to use db_*
2022-05-27 17:24:40 +05:30
realaravinth
098d0cfc24
feat: migrate fetching stats to use db_*
2022-05-27 17:11:15 +05:30
realaravinth
4cd4605266
chore: use local app ctx
2022-05-27 15:25:10 +05:30
realaravinth
12edac7915
feat: migrate get_email to use db_*
2022-05-27 03:08:37 +05:30
realaravinth
aad49dbb94
feat: migrate notifications add, mark_read and get to use db_* traits
2022-05-26 20:03:05 +05:30
realaravinth
2dd18897b0
feat: migrate getting traffic pattern to use db_* interface
2022-05-14 18:45:59 +05:30
realaravinth
a6920f5f36
feat: migrate add user's traffic pattern sqlx postgres to use db_*
2022-05-14 18:22:50 +05:30
realaravinth
a971d4209d
fix and chore: refactor tests to minimize initializing DB connections
...
SUMMARY
The test suite was spinning up way too many database connections that what's
strictly needed and so the test suite was failing with[0]:
code: "53300", message: "sorry, too many clients already"
EXPERIMENTS
Tried sharing database connection pool across all tests with
async_once[0] but faced:
- IO errors
The connections were probably getting dropped in between tests
- actix Actor errors
The actor was probably not getting initialized before a
a reference to the async_once initialized app
context(crate::data::Data) is retrieved and used
FIX
crate::tests was spinning up an App context
instance(crate::data::Data) for most utility functions, which was
unnecessarily excessive.
Each test now creates an instance of the application context at the
beginning and shared a reference with all test utility functions. So
number of database connections/app context instance = number of unit
tests.
[0]: permanently fixes #22
[1]: https://docs.rs/async_once/latest/async_once/
2022-05-14 12:55:56 +05:30
realaravinth
91c6f77cab
chore: update actix-* deps
2022-05-07 16:10:14 +05:30
realaravinth
b057e48d72
feat: migrate pages mod to use actix_auth_middleware
2022-05-07 12:29:02 +05:30
realaravinth
fc8a1670d2
update copyright notice
2022-01-08 22:16:05 +05:30
realaravinth
c46b3f4f4c
Implement easy edit view
...
When user tries to visit this view without an easy configuration
available, i.e, user had created the CAPTCHA using advance view and no
TrafficPattern is available in database, the user will be automatically
redirected to the advance edit page.
But the default edit link everywhere is to the easy edit view.
2021-12-18 21:01:19 +05:30
realaravinth
784aa26dbb
mv edit sitekey into advance edit sitekey
2021-12-18 18:19:23 +05:30
realaravinth
a73542cf18
implement easy sitekey addition
2021-12-18 16:42:27 +05:30
realaravinth
fa9762200e
mv sitekey edit to easy edit
2021-12-18 16:41:00 +05:30
realaravinth
5a49940b89
Get sitekey routes using methods on pages::panel::sitekey::routes::Sitekey
...
for consistency purposes
2021-12-18 16:00:09 +05:30
realaravinth
73ce2d1cb1
refactor captcha.rs and levels.rs and rm duration routes
2021-12-16 20:46:50 +05:30
realaravinth
b2297eab6d
mv add form into advance
2021-12-10 06:16:38 +05:30
realaravinth
6ef941f73d
update username
2021-08-13 18:58:04 +05:30
realaravinth
a65b1c219c
username update
2021-08-12 17:13:17 +05:30
realaravinth
751a1046fb
add sitekey helper in list sitekey page
2021-08-12 08:38:09 +05:30
realaravinth
1d759fcb25
captcha stats
2021-07-27 15:28:21 +05:30
realaravinth
8830961e04
stats endpoint
2021-07-25 21:15:59 +05:30
realaravinth
0a8d36dc9f
sitemap generates URL
2021-07-25 20:15:44 +05:30
realaravinth
e9e6aac770
sitemap
2021-07-21 22:15:52 +05:30
realaravinth
861998af75
lazy element, settings: account delete and secret update
2021-07-21 20:44:22 +05:30
realaravinth
b603208d48
add-data rendering & clipboard takes element
2021-07-21 10:42:25 +05:30
realaravinth
4b18992f6a
settings page, clipboard component
2021-07-20 18:14:23 +05:30
realaravinth
db941d51b7
delete captcha option and sudo page
2021-07-20 15:22:15 +05:30
realaravinth
8f87efeeb3
error correction, tests for err branches, rm get_token, get_token,
...
delete captcha
2021-07-17 17:43:53 +05:30
realaravinth
102ef5b4a1
edit sitekey button in sitekey list table
2021-07-16 17:50:38 +05:30
realaravinth
ea8264054a
edit sitekey, router pattern matching, sitekey update optimization, rm level delete and level err handling
2021-07-16 17:40:52 +05:30
realaravinth
863d22f62c
list sitekey: copy sitekey
2021-07-15 18:07:12 +05:30
realaravinth
883aa122b2
notification date formatting
2021-07-14 21:38:03 +05:30
realaravinth
69de0aaeef
notifications styling
2021-07-14 20:09:00 +05:30
realaravinth
47cca5c9a7
notifications view
2021-07-12 21:22:26 +05:30
realaravinth
b7ec1bca22
duplicate email check and address clippy warnings
2021-07-11 21:46:50 +05:30
realaravinth
43d970980f
responsive navbar
2021-07-01 22:36:22 +05:30
realaravinth
c05888d648
cargo fmt
2021-06-30 20:14:15 +05:30
realaravinth
9f940c317a
upgrading to actix-v4-beta
2021-06-30 20:13:12 +05:30
realaravinth
c581d8d0a3
error handling in auth
2021-06-28 23:03:15 +05:30
realaravinth
6cd477e227
multipart form was a bad idea
2021-06-28 19:58:01 +05:30
realaravinth
cc17f2048f
errorable and seperated runner methods for auth
2021-06-28 19:16:59 +05:30
realaravinth
dcfba60c86
addressing clippy lints
2021-06-11 23:39:38 +05:30
realaravinth
f5624947b9
redis storage for captcha mech
2021-06-11 19:31:03 +05:30
realaravinth
98cf4a476d
widget: verification works
2021-05-29 21:19:45 +05:30
realaravinth
2c209bf8d5
widget template
2021-05-28 21:26:36 +05:30