Commit Graph

310 Commits

Author SHA1 Message Date
bitfl0wer f465ad7cc3 Add more Types 2023-04-25 22:03:25 +02:00
bitfl0wer b976eadd70 metric ton of types for message deserialization 2023-04-25 21:42:46 +02:00
bitfl0wer 0f66081b4d Fix error due to deletion of impl::Display 2023-04-25 21:42:11 +02:00
bitfl0wer 3b8891b2dd Improve readability 2023-04-25 17:41:14 +02:00
bitfl0wer c67c23f6b4 Improve readability 2023-04-25 17:33:35 +02:00
bitfl0wer 6f2dac6695 Split up schemas.rs 2023-04-25 17:32:30 +02:00
bitfl0wer a5943197d4 separate User and Instance limits. 2023-04-24 20:58:45 +02:00
bitfl0wer aba42a6869 Give each user their own rate limits 2023-04-24 19:51:35 +02:00
bitfl0wer 88b715ee6c Merge remote-tracking branch 'origin/main' into improvement/update-rate-limiter-implementation 2023-04-24 19:50:36 +02:00
bitfl0wer 30742380b9 Change HashMap<> to Limits 2023-04-24 19:49:26 +02:00
bitfl0wer 21c7bdcf8b Implement Limits::new() and more logic 2023-04-24 19:38:42 +02:00
bitfl0wer 82770c0400 Create internal User and API UserObject 2023-04-23 21:32:48 +02:00
bitfl0wer c11ae79fe2 comment out test until spacebar pr is merged 2023-04-23 20:21:36 +02:00
bitfl0wer fe3c582d09 Implement Login 2023-04-23 20:11:14 +02:00
bitfl0wer 242eddd5c8 make compiler happy 2023-04-23 14:01:02 +02:00
bitfl0wer 22adda7aa6 start working on login 2023-04-23 14:00:27 +02:00
bitfl0wer 48333cf854 Make send_request return Result 2023-04-23 13:58:17 +02:00
bitfl0wer 8b40b4c3b2 Made test pass 2023-04-23 13:45:52 +02:00
bitfl0wer b374fdee7d Add documentation 2023-04-23 12:06:51 +02:00
bitfl0wer 83ebd482e5 Made AuthEmail, Password and Username reusable 2023-04-23 11:58:45 +02:00
bitfl0wer 1bdf202745 Register function with good errors! 2023-04-22 22:12:56 +02:00
bitfl0wer c6ded56510 push progress 2023-04-22 11:32:44 +02:00
bitfl0wer 752c885c10 Remove boilerplate errors 2023-04-21 23:20:23 +02:00
bitfl0wer aacba2d2a2 impl register 2023-04-21 18:20:57 +02:00
bitfl0wer 06bc2955a3 Move custom errros to central file 2023-04-21 16:18:20 +02:00
bitfl0wer 1c2a60613b Replace Custom Error boilerplate with macro 2023-04-21 15:04:58 +02:00
bitfl0wer dd97341886 Add TODO 2023-04-21 14:30:03 +02:00
bitfl0wer d98316b3ee Fix bad build 2023-04-21 14:27:56 +02:00
bitfl0wer 5baed11d4e Change comment 2023-04-20 19:47:20 +02:00
bitfl0wer fec52f506d begin working on register 2023-04-20 00:14:11 +02:00
bitfl0wer 45b13e4865 add await to fix test error 2023-04-19 20:58:14 +02:00
bitfl0wer e1d004afae add additional documentation and TODO 2023-04-19 20:42:28 +02:00
bitfl0wer db177fdaad create new() method 2023-04-19 20:42:11 +02:00
bitfl0wer d6bd7c4710 Include new file 2023-04-19 20:41:52 +02:00
bitfl0wer c5b9e0efee implement getting InstancePoliciesSchema
Co-authored-by: sky <skyrina@users.noreply.github.com>
2023-04-19 20:41:15 +02:00
bitfl0wer dc5cd09091 start working on register 2023-04-16 23:03:24 +02:00
bitfl0wer 1319ca1736 use camel case 2023-04-16 22:50:51 +02:00
bitfl0wer fde38bc358 remove impl LoginSchema, add InstancePolicies 2023-04-16 22:18:51 +02:00
bitfl0wer 7dc25dd4c6 add auth module 2023-04-16 15:07:15 +02:00
bitfl0wer fc397672f5 reformat file 2023-04-16 14:55:13 +02:00
bitfl0wer 6cba2f93e1 Added email regex validation and tests 2023-04-16 14:09:23 +02:00
bitfl0wer f4b500eadb Implement LoginSchema 2023-04-16 13:41:26 +02:00
bitfl0wer 0ec8e3371b add comment 2023-04-16 12:33:57 +02:00
bitfl0wer 98551dc2a2 Write test to check consent validation 2023-04-16 12:32:49 +02:00
bitfl0wer b8038f52bf write tests to check username validation 2023-04-16 12:30:30 +02:00
bitfl0wer 30610aacfd add tests to confirm password validation 2023-04-16 12:26:12 +02:00
bitfl0wer 1b9ccf3154 add "new" method for RegSchema with custom errors 2023-04-15 22:06:18 +02:00
bitfl0wer db45e493ec Add TotpSchema 2023-04-15 21:20:32 +02:00
bitfl0wer e1003ac2b6 Update RegisterSchema, add LoginSchema 2023-04-15 21:16:47 +02:00
bitfl0wer ff60853d0b create RegisterSchema 2023-04-15 21:12:33 +02:00
bitfl0wer 4f922e163f create schemas.rs 2023-04-15 20:16:18 +02:00
bitfl0wer d30343df38 add add_remaining
add_remaining() adds an i64 to the interal "remaining: u64" with underflow protection.
2023-04-15 17:08:19 +02:00
bitfl0wer ce075524c8 Derive PartialEq and Eq to use assertEq in tests 2023-04-15 13:54:57 +02:00
bitfl0wer ead320f145 Derive Debug, start debugging 2023-04-14 23:38:36 +02:00
bitfl0wer eb67dda8b0 Derive copy trait 2023-04-14 22:22:11 +02:00
bitfl0wer 5cbbddf945 change return type from Limits to HashMap 2023-04-12 22:18:20 +02:00
bitfl0wer ff9424f7ee impl display for limittype, add limittype 2023-04-12 18:32:49 +02:00
bitfl0wer 910313d0ca add .iter() to Limits 2023-04-12 18:18:55 +02:00
bitfl0wer 317c8e801e refactor limit.rs, moved some logic 2023-04-12 16:49:18 +02:00
bitfl0wer 90020d0137 create new folder structure to map api routes 2023-04-10 14:19:31 +02:00