core/apps/webapp/app/services/postAuth.server.ts
Harshith Mullapudi 54e535d57d
Feat: v2 (#12)
* Feat: v2

* feat: add chat functionality

* First cut: integrations

* Feat: add conversation API

* Enhance conversation handling and memory management

* Feat: added conversation

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-07-08 22:41:00 +05:30

22 lines
501 B
TypeScript

import type { User } from "~/models/user.server";
import { createWorkspace } from "~/models/workspace.server";
import { singleton } from "~/utils/singleton";
export async function postAuthentication({
user,
loginMethod,
isNewUser,
}: {
user: User;
loginMethod: User["authenticationMethod"];
isNewUser: boolean;
}) {
if (user.name && isNewUser && loginMethod === "GOOGLE") {
await createWorkspace({
name: user.name,
userId: user.id,
integrations: [],
});
}
}