feat: use cachet for updated pfps

This commit is contained in:
2025-06-10 17:52:51 +02:00
parent 02ebaa2914
commit 6218d328cd
5 changed files with 21 additions and 9 deletions

View File

@@ -33,7 +33,7 @@
"@radix-ui/react-tooltip": "^1.1.6",
"@slack/web-api": "^7.9.1",
"@uidotdev/usehooks": "^2.4.1",
"arctic": "^3.1.1",
"arctic": "^3.7.0",
"bullmq": "^5.45.2",
"cheerio": "^1.0.0",
"class-variance-authority": "^0.7.1",

View File

@@ -4,11 +4,9 @@ import { UniversalForm } from '@/components/app/UniversalForm/UniversalForm';
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/card';
import { onboard } from '@/lib/form/actions';
import { useSession } from '@/lib/providers/SessionProvider';
import { redirect, useRouter } from 'next/navigation';
export default function OnboardingClient() {
const { user } = useSession();
const router = useRouter();
return (
<Card className="mx-auto max-w-sm border-0 shadow-none">

View File

@@ -90,12 +90,14 @@ export async function onboard(prev: any, formData: FormData) {
});
await initializeStreamInfo(createdChannel.id);
await fetch(process.env.WELCOME_WORKFLOW_URL!, {
method: 'POST',
body: JSON.stringify({
username: zod.data.username,
}),
})
if (process.env.NODE_ENV === 'production') {
await fetch(process.env.WELCOME_WORKFLOW_URL!, {
method: 'POST',
body: JSON.stringify({
username: zod.data.username,
}),
})
}
return { success: true };
}

View File

@@ -0,0 +1,3 @@
UPDATE "User"
SET "pfpUrl" = 'https://cachet.dunkirk.sh/users/' || "slack_id" || '/r'
WHERE "slack_id" IS NOT NULL AND "slack_id" != '';

View File

@@ -1948,6 +1948,15 @@ arctic@^3.1.1:
"@oslojs/encoding" "1.1.0"
"@oslojs/jwt" "0.2.0"
arctic@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/arctic/-/arctic-3.7.0.tgz#3d2c601a2e8b03d2f63ce4a9c7546b91d5171c45"
integrity sha512-ZMQ+f6VazDgUJOd+qNV+H7GohNSYal1mVjm5kEaZfE2Ifb7Ss70w+Q7xpJC87qZDkMZIXYf0pTIYZA0OPasSbw==
dependencies:
"@oslojs/crypto" "1.0.1"
"@oslojs/encoding" "1.1.0"
"@oslojs/jwt" "0.2.0"
arg@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c"