feat(ui): improve i18n

This commit is contained in:
Fu Diwei
2024-12-22 19:45:01 +08:00
parent 09919cb3cb
commit d7e205aee7
3 changed files with 7 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ export const list = async (request: ListWorkflowRequest) => {
const page = request.page || 1;
const perPage = request.perPage || 10;
const options: RecordListOptions = { sort: "-created" };
const options: RecordListOptions = { requestKey: null, sort: "-created" };
if (request.enabled != null) {
options.filter = pb.filter("enabled={:enabled}", { enabled: request.enabled });
}
@@ -26,7 +26,9 @@ export const list = async (request: ListWorkflowRequest) => {
};
export const get = async (id: string) => {
return await getPocketBase().collection(COLLECTION_NAME).getOne<WorkflowModel>(id);
return await getPocketBase().collection(COLLECTION_NAME).getOne<WorkflowModel>(id, {
requestKey: null,
});
};
export const save = async (record: Record<string, string | boolean | WorkflowNode>) => {

View File

@@ -16,5 +16,6 @@ export const list = async (request: ListWorkflowLogsRequest) => {
.getList<WorkflowRunLog>(page, perPage, {
filter: getPocketBase().filter("workflow={:workflowId}", { workflowId: request.id }),
sort: "-created",
requestKey: null,
});
};