👽 Update to use new realm filter
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{ author?: string, tag?: string, category?: string, realmId?: number }>()
|
||||
const props = defineProps<{ author?: string, tag?: string, category?: string, realm?: string }>()
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
|
||||
@ -22,8 +22,8 @@ async function loadPost({ done }: any) {
|
||||
if (props.author) {
|
||||
searchQueries.set("author", props.author)
|
||||
}
|
||||
if (props.realmId) {
|
||||
searchQueries.set("realmId", props.realmId.toString())
|
||||
if (props.realm) {
|
||||
searchQueries.set("realm", props.realm)
|
||||
}
|
||||
|
||||
if (props.tag) {
|
||||
|
@ -21,7 +21,7 @@ const loading = ref(false)
|
||||
async function load() {
|
||||
loading.value = true
|
||||
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/co/posts?take=5&realmId=${config.public.solarRealmId}`)
|
||||
const res = await fetch(`${config.public.solarNetworkApi}/cgi/co/posts?take=5&realm=${config.public.solarRealm}`)
|
||||
const result = await res.json()
|
||||
|
||||
items.value.push(...result.data)
|
||||
|
Reference in New Issue
Block a user