diff --git a/deployment/ingress.yml b/deployment/ingress.yml index 766c41f..3d0f0ff 100644 --- a/deployment/ingress.yml +++ b/deployment/ingress.yml @@ -8,10 +8,10 @@ metadata: spec: tls: - hosts: - - testapi.katb.in + - api.katb.in secretName: katbin-tls rules: - - host: testapi.katb.in + - host: api.katb.in http: paths: - path: / diff --git a/src/utils/phonetic_key.rs b/src/utils/phonetic_key.rs index 7df3954..b6ef019 100644 --- a/src/utils/phonetic_key.rs +++ b/src/utils/phonetic_key.rs @@ -5,3 +5,35 @@ pub fn get_random_id() -> String { let mut jirachi = Jirachi::new().unwrap(); jirachi.wish().unwrap() } + +// use rand::prelude::SliceRandom; + +// static VLIST: [&'static str; 5] = ["a", "e", "i", "o", "u"]; +// static CLIST: [&'static str; 21] = [ +// "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", +// "y", "z", +// ]; + +// fn rand_vowel() -> String { +// (*VLIST.choose(&mut rand::thread_rng()).unwrap()).to_owned() +// } + +// fn rand_consonant() -> String { +// (*CLIST.choose(&mut rand::thread_rng()).unwrap()).to_owned() +// } + +// pub fn get_random_id() -> String { +// let mut text = String::from(""); +// let start = if rand::random::() { 0 } else { 1 }; + +// for i in 0..8 { +// let to_push = if i % 2 == start { +// rand_consonant() +// } else { +// rand_vowel() +// }; +// text.push_str(&to_push) +// } + +// text +// }