mirror of
https://github.com/zoriya/vex.git
synced 2026-08-16 02:44:55 +00:00
added search
This commit is contained in:
@@ -87,15 +87,14 @@
|
||||
{/if}
|
||||
|
||||
{#if order !== "default"}
|
||||
<div class="font-light text-sm text-slate-500">
|
||||
<div class="font-light text-sm text-slate-500 flex gap-2">
|
||||
<span>{post.feed.name}</span> |
|
||||
{#if post.authors?.length}
|
||||
{#each post.authors as author}
|
||||
<div class="author">
|
||||
<div class="flex gap-1 items-center">
|
||||
<QuillPenLine />
|
||||
<span>{author}</span>
|
||||
</div>
|
||||
|
|
||||
</div> |
|
||||
{/each}
|
||||
{/if}
|
||||
<Time
|
||||
|
||||
@@ -25,14 +25,12 @@ export async function register(email: string, username: string, password: string
|
||||
return j.token as string;
|
||||
}
|
||||
|
||||
export async function getPosts(token?: string) {
|
||||
const opts = {
|
||||
export async function getPosts(token: string) {
|
||||
const r = await fetch(env.API_URL + '/entries', {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
}
|
||||
}
|
||||
const r = await fetch(env.API_URL + '/entries', token ? opts : undefined);
|
||||
});
|
||||
const j = await r.json();
|
||||
console.log(j);
|
||||
return j as Post[];
|
||||
}
|
||||
Reference in New Issue
Block a user