Skip to content

Commit

Permalink
update test endpoint used in test cases (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Dec 5, 2023
1 parent c8a4d64 commit f538f9a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ async function getTemplate(compilation, { route }) {
}

async function getBody(compilation) {
const artists = await fetch('http://www.analogstudios.net/api/artists').then(resp => resp.json());
const artists = await fetch('http://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const timestamp = new Date().getTime();
const artistsListItems = artists
.filter(artist => artist.isActive === '1')
.filter(artist => artist.isActive === 1)
.map((artist) => {
const { id, name, bio, imageUrl } = artist;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class UsersPage extends HTMLElement {
async connectedCallback() {
const users = await fetch('https://www.analogstudios.net/api/artists').then(resp => resp.json());
const users = await fetch('https://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const html = users.map(user => {
return `
<section>
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test/cases/develop.ssr/src/pages/artists.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ async function getTemplate(compilation, { route }) {
}

async function getBody(compilation) {
const artists = await fetch('http://www.analogstudios.net/api/artists').then(resp => resp.json());
const artists = await fetch('http://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const timestamp = new Date().getTime();
const artistsListItems = artists
.filter(artist => artist.isActive === '1')
.filter(artist => artist.isActive === 1)
.map((artist) => {
const { id, name, bio, imageUrl } = artist;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class UsersPage extends HTMLElement {
async connectedCallback() {
const users = await fetch('https://www.analogstudios.net/api/artists').then(resp => resp.json());
const users = await fetch('https://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const html = users.map(user => {
return `
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ async function getTemplate(compilation, { route }) {
}

async function getBody(compilation) {
const artists = await fetch('http://www.analogstudios.net/api/artists').then(resp => resp.json());
const artists = await fetch('http://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const timestamp = new Date().getTime();
const artistsListItems = artists
.filter(artist => artist.isActive === '1')
.filter(artist => artist.isActive === 1)
.map((artist) => {
const { id, name, bio, imageUrl } = artist;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ async function getTemplate(compilation, { route }) {
}

async function getBody(compilation) {
const artists = await fetch('http://www.analogstudios.net/api/artists').then(resp => resp.json());
const artists = await fetch('http://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const timestamp = new Date().getTime();
const artistsListItems = artists
.filter(artist => artist.isActive === '1')
.filter(artist => artist.isActive === 1)
.map((artist) => {
const { id, name, bio, imageUrl } = artist;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import '../components/card.js';

export default class UsersPage extends HTMLElement {
async connectedCallback() {
const users = await fetch('https://www.analogstudios.net/api/artists').then(resp => resp.json());
const users = await fetch('https://www.analogstudios.net/api/v2/artists').then(resp => resp.json());
const html = users.map(user => {
return `
<wc-card>
Expand Down

0 comments on commit f538f9a

Please sign in to comment.