You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
394 B
11 lines
394 B
import { defineWrappedResponseHandler } from "#server/utils/handler";
|
|
import { R } from "#server/utils/response";
|
|
import { getDefaultAgent } from "#server/service/agent/agent";
|
|
|
|
export default defineWrappedResponseHandler(async () => {
|
|
const agent = await getDefaultAgent();
|
|
if (!agent) {
|
|
return R.error("未找到可用 agent", null);
|
|
}
|
|
return R.success({ slug: agent.slug });
|
|
});
|
|
|