feat: set and user custom title

This commit is contained in:
2022-03-27 02:52:13 +08:00
parent 5bef37cd62
commit f5b0dbdbac
6 changed files with 65 additions and 9 deletions

View File

@@ -84,6 +84,7 @@ pub enum PolicyError {
IsReported,
IsDeleted,
NotAllowed,
TitleUsed,
}
#[derive(Debug)]
@@ -112,6 +113,7 @@ impl<'r> Responder<'r, 'static> for APIError {
PolicyError::IsReported => "内容被举报,处理中",
PolicyError::IsDeleted => "内容被删除",
PolicyError::NotAllowed => "不允许的操作",
PolicyError::TitleUsed => "头衔已被使用",
}
})
.respond_to(req),