feat: add emoji rename endpoint (#714)
* feat: add rename endpoint with rename-only update Signed-off-by: Gabriel <60961939+gabrielfordevelopment@users.noreply.github.com> * fix: enforce detached emoji edit restrictions Signed-off-by: Gabriel <60961939+gabrielfordevelopment@users.noreply.github.com> * fix: always enforce emoji edit permissions Signed-off-by: Gabriel <60961939+gabrielfordevelopment@users.noreply.github.com> --------- Signed-off-by: Gabriel <60961939+gabrielfordevelopment@users.noreply.github.com>
This commit is contained in:
@@ -54,4 +54,22 @@ auto_derived!(
|
||||
#[serde(default)]
|
||||
pub nsfw: bool,
|
||||
}
|
||||
|
||||
/// Partial emoji representation
|
||||
#[derive(Default)]
|
||||
pub struct PartialEmoji {
|
||||
#[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
||||
/// Edit emoji information
|
||||
#[cfg_attr(feature = "validator", derive(Validate))]
|
||||
pub struct DataEditEmoji {
|
||||
/// Emoji name
|
||||
#[cfg_attr(
|
||||
feature = "validator",
|
||||
validate(length(min = 1, max = 32), regex = "RE_EMOJI")
|
||||
)]
|
||||
pub name: Option<String>,
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user