-use crate::{settings::Settings, APIError};
+use crate::{settings::Settings, ApiError};
use actix_web::dev::ConnectionInfo;
use chrono::{DateTime, FixedOffset, NaiveDateTime};
use itertools::Itertools;
}
}
-pub fn check_slurs(text: &str) -> Result<(), APIError> {
+pub fn check_slurs(text: &str) -> Result<(), ApiError> {
if let Err(slurs) = slur_check(text) {
- Err(APIError::err(&slurs_vec_to_str(slurs)))
+ Err(ApiError::err(&slurs_vec_to_str(slurs)))
} else {
Ok(())
}
}
-pub fn check_slurs_opt(text: &Option<String>) -> Result<(), APIError> {
+pub fn check_slurs_opt(text: &Option<String>) -> Result<(), ApiError> {
match text {
Some(t) => check_slurs(t),
None => Ok(()),