Skip to content

Commit 6c267cb

Browse files
committed
disable sample response for live
1 parent 4357ed5 commit 6c267cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

assets/scripts/responses.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ const endpoints = {
503503
description: 'Match time of completion'
504504
},
505505
],
506-
sampleUrl: `https://api.mcsrranked.com/users/3c8757790ab0400b8b9e3936e0dd535b/seasons`
506+
sampleUrl: null
507507
},
508508
'matches/': {
509509
title: `Get Recent Matches`,
@@ -887,6 +887,10 @@ function getResponseExample(endpoint) {
887887
}
888888

889889
function getSampleResponse(url, id) {
890+
if (url == `'null'`) {
891+
$(`#${id}`).html(`<pre>This endpoint doesn't support sample response. :(</pre>`);
892+
return;
893+
}
890894
$(`#${id}`).html(`<pre>Loading...</pre>`);
891895
fetch(url).then(r => r.json()).then(json => {
892896
const limitArraysToFive = (obj) => {

0 commit comments

Comments
 (0)