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
Этот коммит содержится в:
Harrison Healey
2023-10-17 12:03:28 -04:00
коммит произвёл GitHub
родитель 77cc356d46
Коммит 3d0fd16666
8 изменённых файлов: 241 добавлений и 35 удалений

Просмотреть файл

@@ -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})}`,