Working full stack forums get
This commit is contained in:
@@ -1,2 +1,16 @@
|
||||
<h1>api</h1>
|
||||
<a href="/api/foorum">foorum</a>
|
||||
<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>
|
||||
Reference in New Issue
Block a user