chore: drop unused TanStack Vue Query and ts-rest client
Some checks failed
CI / verify (push) Failing after 1m2s
Some checks failed
CI / verify (push) Failing after 1m2s
VueQueryPlugin was mounted but no useQuery/useMutation calls existed, and the noteRouter ts-rest contract was never imported. The callers of api.remanso.space all use plain fetch(), so the three packages (@tanstack/vue-query, @ts-rest/core, @ts-rest/vue-query) and the src/modules/post directory can go.
This commit is contained in:
@@ -2,7 +2,6 @@ import "notyf/notyf.min.css"
|
||||
import "./styles/app.css"
|
||||
import "@/analytics/openpanel"
|
||||
|
||||
import { VueQueryPlugin } from "@tanstack/vue-query"
|
||||
import { createPinia } from "pinia"
|
||||
import { createApp } from "vue"
|
||||
import { createI18n } from "vue-i18n"
|
||||
@@ -19,7 +18,6 @@ const i18n = createI18n({
|
||||
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(VueQueryPlugin)
|
||||
.use(i18n)
|
||||
.use(createPinia())
|
||||
.mount("#app")
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import { initContract } from "@ts-rest/core"
|
||||
import { initQueryClient } from "@ts-rest/vue-query"
|
||||
import { type } from "arktype"
|
||||
|
||||
const PublicNoteListItem = type({
|
||||
did: "string",
|
||||
rkey: "string",
|
||||
title: "string",
|
||||
publishedAt: "string",
|
||||
createdAt: "string"
|
||||
})
|
||||
|
||||
export type PublicNoteListItem = typeof PublicNoteListItem.infer
|
||||
|
||||
const PublicNote = type({
|
||||
did: "string",
|
||||
rkey: "string",
|
||||
title: "string",
|
||||
content: "string",
|
||||
publishedAt: "string",
|
||||
createdAt: "string"
|
||||
})
|
||||
|
||||
export type PublicNote = typeof PublicNote.infer
|
||||
|
||||
const contract = initContract()
|
||||
|
||||
export const noteRouter = contract.router({
|
||||
noteLists: {
|
||||
method: "GET",
|
||||
path: "/notes",
|
||||
query: contract.type<{ cursor?: string; limit?: number }>(),
|
||||
responses: {
|
||||
200: contract.type<{ notes: PublicNoteListItem[] }>()
|
||||
},
|
||||
summary: "List all notes"
|
||||
},
|
||||
noteListsByDid: {
|
||||
method: "GET",
|
||||
path: "/:did/notes",
|
||||
pathParams: contract.type<{ did: string }>(),
|
||||
query: contract.type<{ cursor?: string; limit?: number }>(),
|
||||
responses: {
|
||||
200: contract.type<{ notes: PublicNoteListItem[] }>()
|
||||
},
|
||||
summary: "List all notes"
|
||||
}
|
||||
})
|
||||
|
||||
export const client = initQueryClient(noteRouter, {
|
||||
baseUrl: "https://api.remanso.space"
|
||||
})
|
||||
Reference in New Issue
Block a user