APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name (#6117)
* APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name
* updated v3 deleteReaction endpoint
* update parameter of app.DeleteReactionForPost()
* update utils.IsValidAlphaNum, add utils.IsValidAlphaNumHyphenUnderscore, and add related tests
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
e62afeace0
Коммит
ecb10ed62f
@@ -57,6 +57,21 @@ func TestReactionIsValid(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
reaction.EmojiName = "emoji-"
|
||||
if err := reaction.IsValid(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
reaction.EmojiName = "emoji_"
|
||||
if err := reaction.IsValid(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
reaction.EmojiName = "emoji:"
|
||||
if err := reaction.IsValid(); err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
reaction.CreateAt = 0
|
||||
if err := reaction.IsValid(); err == nil {
|
||||
t.Fatal("create at should be invalid")
|
||||
|
||||
Ссылка в новой задаче
Block a user