diff --git a/apps/scoutgamecron/src/scripts/createBuilder.ts b/apps/scoutgamecron/src/scripts/createBuilder.ts index 2f33d21743..378fd4b35b 100644 --- a/apps/scoutgamecron/src/scripts/createBuilder.ts +++ b/apps/scoutgamecron/src/scripts/createBuilder.ts @@ -52,6 +52,7 @@ async function createBuilder({ fid, githubLogin }: { fid: number; githubLogin: s builderStatus: 'applied', farcasterId: fid, farcasterName: username, + referralCode: username + Math.random().toString().replace('.', '').slice(0, 6), githubUser: githubUserDB ? { connect: { id: githubUserDB.id } } : { diff --git a/apps/scoutgamecron/src/scripts/createBuilders.ts b/apps/scoutgamecron/src/scripts/createBuilders.ts index 51606c2565..3153f97806 100644 --- a/apps/scoutgamecron/src/scripts/createBuilders.ts +++ b/apps/scoutgamecron/src/scripts/createBuilders.ts @@ -49,6 +49,7 @@ async function createBuilders() { update: {}, create: { displayName, + referralCode: username + Math.random().toString().replace('.', '').slice(0, 6), path: username, avatar: avatarUrl, bio, diff --git a/apps/scoutgamecron/src/scripts/createScouts.ts b/apps/scoutgamecron/src/scripts/createScouts.ts index e35852042f..702e23717d 100644 --- a/apps/scoutgamecron/src/scripts/createScouts.ts +++ b/apps/scoutgamecron/src/scripts/createScouts.ts @@ -22,6 +22,7 @@ async function createScouts(farcasterUsernames: string[]) { update: {}, create: { displayName, + referralCode: farcasterUsername + Math.random().toString().replace('.', '').slice(0, 6), path: farcasterUsername, avatar: avatarUrl, bio, diff --git a/apps/scoutgamecron/src/scripts/seeder/seedWithRealCharmverseGithubData.ts b/apps/scoutgamecron/src/scripts/seeder/seedWithRealCharmverseGithubData.ts index 22408830b4..4479b0b2c0 100644 --- a/apps/scoutgamecron/src/scripts/seeder/seedWithRealCharmverseGithubData.ts +++ b/apps/scoutgamecron/src/scripts/seeder/seedWithRealCharmverseGithubData.ts @@ -89,6 +89,7 @@ export async function seedWithRealCharmverseGithubData() { builder: { create: { displayName: builder, + referralCode: builder + Math.random().toString().replace('.', '').slice(0, 6), path: builder + Math.random().toString().replace('.', '').slice(0, 6), builderStatus: 'approved', avatar @@ -104,6 +105,7 @@ export async function seedWithRealCharmverseGithubData() { data: { builder: { create: { + referralCode: builder + Math.random().toString().replace('.', '').slice(0, 6), displayName: builder, path: builder, builderStatus: 'approved',