16 lines
438 B
HTML
16 lines
438 B
HTML
<h1>api</h1>
|
|
<a href="/api/foorum">foorum</a>
|
|
<button onclick="getForums()">GetAll</button>
|
|
<code><pre id="output"></pre></code>
|
|
|
|
<script>
|
|
function getForums() {
|
|
var out = document.getElementById("output");
|
|
fetch("/api/foorum").then(resp => {
|
|
return resp.json();
|
|
}).then(data => {
|
|
console.log(data);
|
|
out.innerText = JSON.stringify(data, null, 2);
|
|
});
|
|
}
|
|
</script> |