@chayns-components/emoji-input
Version:
Input field that supports HTML elements and emojis
36 lines (35 loc) • 833 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getEmojiHistory = void 0;
var _externalServerUrl = require("../../constants/externalServerUrl");
const getEmojiHistory = async ({
accessToken,
personId
}) => {
const requestInit = {
headers: {
Authorization: `Bearer ${accessToken}`
},
method: 'GET'
};
const url = `${_externalServerUrl.ITEM_STORAGE_BASE_URL}/7/users/${personId}/keys/emojis`;
const response = await fetch(url, requestInit);
if (response.status === 200) {
try {
const data = await response.json();
return {
data: data.value,
status: 200
};
} catch (e) {
// Do nothing
}
}
return {
status: response.status
};
};
exports.getEmojiHistory = getEmojiHistory;
//# sourceMappingURL=get.js.map