mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-24 00:01:03 +08:00
15 lines
426 B
TypeScript
15 lines
426 B
TypeScript
export default defineEventHandler((event) => {
|
|
const query = getQuery(event);
|
|
const toolCall = query.tool;
|
|
const forwardCall = query.forward;
|
|
if (toolCall) {
|
|
const buildUrl = "/desktop?openapp=" + toolCall;
|
|
return sendRedirect(event, buildUrl, 302);
|
|
}
|
|
if (forwardCall) {
|
|
const buildUrl = "/" + forwardCall;
|
|
return sendRedirect(event, buildUrl, 302);
|
|
}
|
|
return sendRedirect(event, "/", 302);
|
|
});
|