mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-10 08:48:29 +00:00
* 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>
22 lines
501 B
TypeScript
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: [],
|
|
});
|
|
}
|
|
}
|