Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

27 Zeilen
836 B

function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
try {
fetch('http://api.kfcoding.com/api/practice/trains/competition', {
headers: {
'Content-Type': 'application/json',
Authorization: getCookie('token')
},
method: 'POST',
body: JSON.stringify({repo: 'https://github.com/openx-lab/go-study-guide.git'})
}).then(resp => resp.json())
.then(data => {
return fetch('http://api.kfcoding.com/api/practice/trains/competition/end', {
headers: {
'Content-Type': 'application/json',
Authorization: getCookie('token')
},
method: 'PUT',
body: JSON.stringify({id: data.data.id})
})
})
} catch (e) {
console.log(e)
}