Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 3, 2024
1 parent 6e13d16 commit e3ae2d0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 47 deletions.
7 changes: 1 addition & 6 deletions apps/dashboard/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ const config = {
},
],
},
transpilePackages: [
"@midday/ui",
"@midday/jobs",
"@midday/tailwind",
"@midday/invoice",
],
transpilePackages: ["@midday/ui", "@midday/tailwind", "@midday/invoice"],
eslint: {
ignoreDuringBuilds: true,
},
Expand Down
2 changes: 0 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@midday/events": "workspace:*",
"@midday/inbox": "workspace:*",
"@midday/invoice": "workspace:*",
"@midday/jobs": "workspace:*",
"@midday/kv": "workspace:*",
"@midday/location": "workspace:*",
"@midday/notification": "workspace:*",
Expand All @@ -39,7 +38,6 @@
"@todesktop/client-active-win": "^0.15.0",
"@todesktop/client-core": "^1.12.0",
"@todesktop/runtime": "^1.6.4",
"@trigger.dev/nextjs": "3.3.4",
"@trigger.dev/react-hooks": "3.3.4",
"@uidotdev/usehooks": "^2.4.1",
"@upstash/ratelimit": "^2.0.4",
Expand Down
9 changes: 0 additions & 9 deletions apps/dashboard/src/app/api/trigger/route.ts

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
60 changes: 30 additions & 30 deletions packages/app-store/src/slack/lib/events/file/share.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { Events, client } from "@midday/jobs";
import type { FileShareMessageEvent } from "@slack/web-api";
// import { Events, client } from "@midday/jobs";
// import type { FileShareMessageEvent } from "@slack/web-api";

export async function fileShare(
event: FileShareMessageEvent,
{ teamId, token }: { teamId: string; token: string },
) {
const files = event?.files?.map((file) => ({
id: file.id,
name: file.name,
mimetype: file.mimetype,
size: file.size,
url: file.url_private_download,
}));
// export async function fileShare(
// event: FileShareMessageEvent,
// { teamId, token }: { teamId: string; token: string },
// ) {
// const files = event?.files?.map((file) => ({
// id: file.id,
// name: file.name,
// mimetype: file.mimetype,
// size: file.size,
// url: file.url_private_download,
// }));

if (files && files.length > 0) {
await Promise.all(
files.map((file) =>
client.sendEvent({
name: Events.INBOX_SLACK_UPLOAD,
payload: {
teamId,
token,
channelId: event.channel,
threadId: event.thread_ts,
file,
},
}),
),
);
}
}
// if (files && files.length > 0) {
// await Promise.all(
// files.map((file) =>
// client.sendEvent({
// name: Events.INBOX_SLACK_UPLOAD,
// payload: {
// teamId,
// token,
// channelId: event.channel,
// threadId: event.thread_ts,
// file,
// },
// }),
// ),
// );
// }
// }

0 comments on commit e3ae2d0

Please sign in to comment.