Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
barista: Update Strapi endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lara Aigmueller committed Jan 30, 2020
1 parent 88edf39 commit a828ef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/barista/src/builder/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function createStrapiSnippets(content: string): Promise<void> {
.map((_, el) => $(el).attr('name'))
.get();
if (snippetNames.length) {
const host = `http://${environment.strapiEndpoint}:5100/snippets`;
const host = `${environment.strapiEndpoint}/snippets`;
for (const name of snippetNames) {
// Check if entry with given slotId already exists.
try {
Expand Down
6 changes: 3 additions & 3 deletions tools/barista/src/utils/fetch-strapi-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function fetchContentList<
if (options.publicContent) {
requestPath = `${requestPath}?public=true`;
}
const host = `http://${endpoint}:5100${requestPath}`;
const host = `${endpoint}${requestPath}`;
const strapiResponse = await Axios.get<T[]>(host);
return strapiResponse.data;
}
Expand All @@ -63,7 +63,7 @@ export async function fetchContentItemById<
if (options.publicContent) {
requestPath = `${requestPath}?public=true`;
}
const host = `http://${endpoint}:5100${requestPath}`;
const host = `${endpoint}${requestPath}`;
const strapiResponse = await Axios.get<T>(host);
return strapiResponse.data;
}
Expand All @@ -85,7 +85,7 @@ export async function fetchContentItemByField<
if (options.publicContent) {
requestPath = `${requestPath}&public=true`;
}
const host = `http://${endpoint}:5100${requestPath}`;
const host = `${endpoint}${requestPath}`;
const strapiResponse = await Axios.get<T>(host);
return strapiResponse.data;
}

0 comments on commit a828ef9

Please sign in to comment.