docs: Convert code examples to JS

This commit is contained in:
Faruk AYDIN
2024-01-15 13:13:48 +01:00
parent 9ece9461dc
commit 8fcb7840de
3 changed files with 10 additions and 10 deletions

View File

@@ -103,18 +103,18 @@ export default defineTrigger({
let response;
const headers = {
'x-api-key': $.auth.data.apiKey as string,
'x-api-key': $.auth.data.apiKey,
};
do {
let requestPath = `/v1/images/search?page=${page}&limit=10&order=DESC`;
response = await $.http.get(requestPath, { headers });
response.data.forEach((image: IJSONObject) => {
response.data.forEach((image) => {
const dataItem = {
raw: image,
meta: {
internalId: image.id as string
internalId: image.id
},
};