feat: def interface to get traffic pattern

This commit is contained in:
realaravinth
2022-05-14 18:45:25 +05:30
parent a6920f5f36
commit 212c03a0e2
3 changed files with 18 additions and 1 deletions

View File

@@ -140,6 +140,13 @@ pub async fn database_works<'a, T: MCDatabase>(
// get captcha cooldown duration
assert_eq!(db.get_captcha_cooldown(c.key).await.unwrap(), c.duration);
// add traffic pattern
db.add_traffic_pattern(p.username, c.key, tp).await.unwrap();
assert_eq!(
&db.get_traffic_pattern(p.username, c.key).await.unwrap(),
tp
);
// add captcha levels
db.add_captcha_levels(p.username, c.key, l).await.unwrap();