MM-54640 Add API to get multiple emojis by name at once (#24651)
* MM-54640 Add API to get multiple emojis by name at once * Fix status code when too many names are requested * Address feedback * Update unit tests * Fix styling * Fix more styling * Fix mismatched i18n id
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
77cc356d46
Коммит
3d0fd16666
@@ -2749,6 +2749,13 @@ export default class Client4 {
|
||||
);
|
||||
};
|
||||
|
||||
getCustomEmojisByNames = (names: string[]) => {
|
||||
return this.doFetch<CustomEmoji[]>(
|
||||
`${this.getEmojisRoute()}/names`,
|
||||
{method: 'post', body: JSON.stringify(names)},
|
||||
);
|
||||
};
|
||||
|
||||
getCustomEmojis = (page = 0, perPage = PER_PAGE_DEFAULT, sort = '') => {
|
||||
return this.doFetch<CustomEmoji[]>(
|
||||
`${this.getEmojisRoute()}${buildQueryString({page, per_page: perPage, sort})}`,
|
||||
|
||||
Ссылка в новой задаче
Block a user