feat: restructure into XFlow monorepo with Nuxt 4, Modular Onion Monolith, Android client, and Desktop CLI
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { getListsUseCase } from '../../../modules/notes-lists';
|
||||
import { getAuthUser } from '../../../utils/auth';
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const user = getAuthUser(event);
|
||||
const ownerId = user?.id || (getQuery(event).userId as string) || 'default-user';
|
||||
const category = getQuery(event).category as string | undefined;
|
||||
|
||||
const result = await getListsUseCase.execute({ ownerId, category });
|
||||
if (result.isFailure) {
|
||||
throw createError({ statusCode: 400, message: result.getError().message });
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
lists: result.getValue().map(l => l.toJSON())
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user