Skip to content

Commit

Permalink
Merge branch 'main' into refactor/6722
Browse files Browse the repository at this point in the history
  • Loading branch information
guqing authored Oct 8, 2024
2 parents a7020e2 + f632322 commit 0aa9dc9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/src/formkit/inputs/user-select.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// TODO: This is a temporary approach.
// We will provide searchable user selection components in the future.

import type { FormKitNode, FormKitTypeDefinition } from "@formkit/core";
import { consoleApiClient } from "@halo-dev/api-client";
import { select } from "./select";

const ANONYMOUSUSER_NAME = "anonymousUser";
const DELETEDUSER_NAME = "ghost";

const search = async ({ page, size, keyword }) => {
const { data } = await consoleApiClient.user.listUsers({
page,
size,
keyword,
fieldSelector: [`name!=${ANONYMOUSUSER_NAME}`, `name!=${DELETEDUSER_NAME}`],
});
return {
options: data.items?.map((user) => {
Expand Down

0 comments on commit 0aa9dc9

Please sign in to comment.