mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 16:16:02 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1e2456ada |
@@ -169,6 +169,7 @@ export function serveStaticViaImport(opts?: { manifest?: Manifest }) {
|
||||
if (files.includes(path)) {
|
||||
try {
|
||||
const content = await import(`bknd/static/${path}?raw`, {
|
||||
/* @vite-ignore */
|
||||
assert: { type: "text" },
|
||||
}).then((m) => m.default);
|
||||
|
||||
|
||||
@@ -256,10 +256,12 @@ export class DataController extends Controller {
|
||||
// read many
|
||||
const saveRepoQuery = s
|
||||
.object({
|
||||
...omitKeys(repoQuery.properties, ["with"]),
|
||||
...omitKeys(repoQuery.properties, ["with", "where"]),
|
||||
sort: s.string({ default: "id" }),
|
||||
select: s.array(s.string()),
|
||||
join: s.array(s.string()),
|
||||
with: s.anyOf([s.array(s.string()), s.record(s.object({}))]),
|
||||
where: s.object({}),
|
||||
})
|
||||
.partial();
|
||||
const saveRepoQueryParams = (pick: string[] = Object.keys(repoQuery.properties)) => [
|
||||
@@ -273,7 +275,15 @@ export class DataController extends Controller {
|
||||
"/:entity",
|
||||
describeRoute({
|
||||
summary: "Read many",
|
||||
parameters: saveRepoQueryParams(["limit", "offset", "sort", "select", "join"]),
|
||||
parameters: saveRepoQueryParams([
|
||||
"limit",
|
||||
"offset",
|
||||
"sort",
|
||||
"select",
|
||||
"join",
|
||||
"with",
|
||||
"where",
|
||||
]),
|
||||
tags: ["data"],
|
||||
}),
|
||||
permission(DataPermissions.entityRead),
|
||||
|
||||
Reference in New Issue
Block a user