chore: move api to remanso.space

This commit is contained in:
Julien Calixte
2026-03-17 00:53:58 +01:00
parent 4d04d174ba
commit 40c461e150
3 changed files with 12 additions and 6 deletions

View File

@@ -3,11 +3,16 @@ import { PublicNoteListItem } from "@/modules/note/models/Note"
import { computedAsync } from "@vueuse/core"
import { computed, ref, Ref, watch } from "vue"
export function useFollowingNoteList(dids: Ref<Set<string>>, enabled: Ref<boolean>) {
export function useFollowingNoteList(
dids: Ref<Set<string>>,
enabled: Ref<boolean>,
) {
const isLoading = ref(false)
const notes = ref<PublicNoteListItem[]>([])
const cursor = ref<string | null | undefined>(null)
const canLoadMore = computed(() => dids.value.size > 0 && cursor.value !== undefined)
const canLoadMore = computed(
() => dids.value.size > 0 && cursor.value !== undefined,
)
const onLoadMore = async () => {
if (isLoading.value) return
@@ -24,13 +29,14 @@ export function useFollowingNoteList(dids: Ref<Set<string>>, enabled: Ref<boolea
body.cursor = cursor.value
}
const response = await fetch("https://api.litenote.li212.fr/notes/feed", {
const response = await fetch("https://api.remanso.space/notes/feed", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
})
const data: { notes: PublicNoteListItem[]; cursor?: string } = await response.json()
const data: { notes: PublicNoteListItem[]; cursor?: string } =
await response.json()
notes.value.push(...data.notes)
cursor.value = data.cursor

View File

@@ -18,7 +18,7 @@ export function usePublicNoteList(options?: UsePublicNoteListOptions) {
isLoading.value = true
const path = options?.did?.value ? `/${options.did.value}/notes` : "/notes"
const noteAPI = new URL(path, "https://api.litenote.li212.fr")
const noteAPI = new URL(path, "https://api.remanso.space")
if (cursor.value) {
noteAPI.searchParams.set("cursor", cursor.value)

View File

@@ -60,5 +60,5 @@ export const noteRouter = contract.router({
})
export const client = initQueryClient(noteRouter, {
baseUrl: "https://api.litenote.li212.fr",
baseUrl: "https://api.remanso.space",
})