Forum authro search is working
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<h1>api</h1>
|
||||
<a href="/api/foorum">foorum</a>
|
||||
<br/>
|
||||
<button onclick="getForum(prompt('ForumId: ', '1'))">GetForum</button>
|
||||
<button onclick="getForums()">GetAllForums</button>
|
||||
<button onclick="addForum()">AddForum</button>
|
||||
<button onclick="searchForumAuthor(prompt('Author: ', 'veeb'))">SearchForumAuthor</button>
|
||||
<code><pre id="output"></pre></code>
|
||||
|
||||
<script>
|
||||
@@ -42,4 +44,13 @@
|
||||
body: JSON.stringify(dto)
|
||||
});
|
||||
}
|
||||
|
||||
function searchForumAuthor(author) {
|
||||
fetch("/api/search?author="+author).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