chore: lint and fmt
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { initContract } from "@ts-rest/core"
|
||||
import { type } from "arktype"
|
||||
import { initQueryClient } from "@ts-rest/vue-query"
|
||||
import { type } from "arktype"
|
||||
|
||||
const PublicNoteListItem = type({
|
||||
did: "string",
|
||||
rkey: "string",
|
||||
title: "string",
|
||||
publishedAt: "string",
|
||||
createdAt: "string",
|
||||
createdAt: "string"
|
||||
})
|
||||
|
||||
export type PublicNoteListItem = typeof PublicNoteListItem.infer
|
||||
@@ -18,7 +18,7 @@ const PublicNote = type({
|
||||
title: "string",
|
||||
content: "string",
|
||||
publishedAt: "string",
|
||||
createdAt: "string",
|
||||
createdAt: "string"
|
||||
})
|
||||
|
||||
export type PublicNote = typeof PublicNote.infer
|
||||
@@ -31,34 +31,34 @@ export const noteRouter = contract.router({
|
||||
path: "/notes",
|
||||
query: type({
|
||||
cursor: "string | undefined",
|
||||
limit: "number | undefined",
|
||||
limit: "number | undefined"
|
||||
}),
|
||||
responses: {
|
||||
200: type({
|
||||
notes: PublicNoteListItem.array(),
|
||||
}),
|
||||
notes: PublicNoteListItem.array()
|
||||
})
|
||||
},
|
||||
summary: "List all notes",
|
||||
summary: "List all notes"
|
||||
},
|
||||
noteListsByDid: {
|
||||
method: "GET",
|
||||
path: "/:did/notes",
|
||||
pathParams: type({
|
||||
did: "string",
|
||||
did: "string"
|
||||
}),
|
||||
query: type({
|
||||
cursor: "string | undefined",
|
||||
limit: "number | undefined",
|
||||
limit: "number | undefined"
|
||||
}),
|
||||
responses: {
|
||||
200: type({
|
||||
notes: PublicNoteListItem.array(),
|
||||
}),
|
||||
notes: PublicNoteListItem.array()
|
||||
})
|
||||
},
|
||||
summary: "List all notes",
|
||||
},
|
||||
summary: "List all notes"
|
||||
}
|
||||
})
|
||||
|
||||
export const client = initQueryClient(noteRouter, {
|
||||
baseUrl: "https://api.remanso.space",
|
||||
baseUrl: "https://api.remanso.space"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user