Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix: prisma import in extract user route in Cal AI (calcom#11625)
Browse files Browse the repository at this point in the history
  • Loading branch information
DexterStorey authored Sep 29, 2023
1 parent 4a81b59 commit e5b88bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calcom/ai",
"version": "1.1.0",
"version": "1.1.1",
"private": true,
"author": "Cal.com Inc.",
"dependencies": {
Expand Down
6 changes: 4 additions & 2 deletions apps/ai/src/utils/extractUsers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import prisma from "@calcom/prisma";

import type { UserList } from "../types/user";

/*
* Extracts usernames (@Example) and emails ([email protected]) from a string
*/
import type { UserList } from "../types/user";

export const extractUsers = async (text: string) => {
const usernames = text.match(/(?<![a-zA-Z0-9_.])@[a-zA-Z0-9_]+/g)?.map((username) => username.slice(1));
const emails = text.match(/[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+/g);
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"@calcom/ai#build": {
"env": [
"FRONTEND_URL",
"BACKEND_URL",
"APP_ID",
"APP_URL",
Expand Down

0 comments on commit e5b88bd

Please sign in to comment.