(id: String, email: String, password: String, nickname: String)
| 31 | |
| 32 | impl Account { |
| 33 | pub fn new(id: String, email: String, password: String, nickname: String) -> Self { |
| 34 | Self { |
| 35 | id, |
| 36 | email, |
| 37 | state: Default::default(), |
| 38 | hashed_password: Self::hash_password(password), |
| 39 | nickname, |
| 40 | create_dt: Default::default(), |
| 41 | version: 0, |
| 42 | } |
| 43 | } |
| 44 | pub fn hash_password(plain_password: String) -> String { |
| 45 | bcrypt::hash(plain_password, 4).unwrap() |
| 46 | } |
nothing calls this directly
no outgoing calls
no test coverage detected