11import { prisma } from "../seed/prisma-client" ;
22import { hashPassword } from "../../src/utils/auth" ;
33import { getRoleId } from "../seed/users" ;
4+ import { generateGravatarUrl } from "../seed/utils" ;
45
56export const populateUsersProd = async ( ) => {
67 const roles = await prisma . role . findMany ( { } ) ;
@@ -13,7 +14,7 @@ export const populateUsersProd = async () => {
1314 emailVerified : true ,
1415 firstName : "Admin" ,
1516 lastName : "Surname" ,
16- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
17+ avatar : generateGravatarUrl ( "admin@example .com" ) ,
1718 timezone : "US/Central" ,
1819 countryCode : "US" ,
1920 } ,
@@ -34,7 +35,7 @@ export const populateUsersProd = async () => {
3435 emailVerified : true ,
3536 firstName : "Jim" ,
3637 lastName : "PO" ,
37- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
38+ avatar : generateGravatarUrl ( "jim@example .com" ) ,
3839 timezone : "US/Central" ,
3940 countryCode : "US" ,
4041 } ,
@@ -54,7 +55,7 @@ export const populateUsersProd = async () => {
5455 emailVerified : true ,
5556 firstName : "Razieh" ,
5657 lastName : "PO" ,
57- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
58+ avatar : generateGravatarUrl ( "razieh@example .com" ) ,
5859 timezone : "Europe/Madrid" ,
5960 countryCode : "ES" ,
6061 } ,
@@ -74,7 +75,7 @@ export const populateUsersProd = async () => {
7475 emailVerified : true ,
7576 firstName : "Mladen" ,
7677 lastName : "PO" ,
77- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
78+ avatar : generateGravatarUrl ( "mladen@example .com" ) ,
7879 timezone : "Europe/Madrid" ,
7980 countryCode : "ES" ,
8081 } ,
@@ -96,7 +97,7 @@ export const populateUsersProd = async () => {
9697 emailVerified : true ,
9798 firstName : "Eury" ,
9899 lastName : "Design" ,
99- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
100+ avatar : generateGravatarUrl ( "eury@example .com" ) ,
100101 timezone : "US/Central" ,
101102 countryCode : "US" ,
102103 } ,
@@ -116,7 +117,7 @@ export const populateUsersProd = async () => {
116117 emailVerified : true ,
117118 firstName : "Joe" ,
118119 lastName : "Design" ,
119- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
120+ avatar : generateGravatarUrl ( "joe@example .com" ) ,
120121 timezone : "US/Central" ,
121122 countryCode : "US" ,
122123 } ,
@@ -136,7 +137,7 @@ export const populateUsersProd = async () => {
136137 emailVerified : true ,
137138 firstName : "Joseph" ,
138139 lastName : "Design" ,
139- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
140+ avatar : generateGravatarUrl ( "joseph@example .com" ) ,
140141 timezone : "America/Lima" ,
141142 countryCode : "PE" ,
142143 } ,
@@ -156,7 +157,7 @@ export const populateUsersProd = async () => {
156157 emailVerified : true ,
157158 firstName : "Austin" ,
158159 lastName : "Design" ,
159- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
160+ avatar : generateGravatarUrl ( "austin@example .com" ) ,
160161 timezone : "US/Pacific" ,
161162 countryCode : "US" ,
162163 } ,
@@ -178,7 +179,7 @@ export const populateUsersProd = async () => {
178179 emailVerified : true ,
179180 firstName : "Dan" ,
180181 lastName : "Frontend" ,
181- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
182+ avatar : generateGravatarUrl ( "dan@example .com" ) ,
182183 timezone : "US/Eastern" ,
183184 countryCode : "US" ,
184185 } ,
@@ -198,7 +199,7 @@ export const populateUsersProd = async () => {
198199 emailVerified : true ,
199200 firstName : "Jane" ,
200201 lastName : "Frontend" ,
201- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
202+ avatar : generateGravatarUrl ( "jane@example .com" ) ,
202203 timezone : "Asia/Tbilisi" ,
203204 countryCode : "GE" ,
204205 } ,
@@ -218,7 +219,7 @@ export const populateUsersProd = async () => {
218219 emailVerified : true ,
219220 firstName : "Timothy" ,
220221 lastName : "Frontend" ,
221- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
222+ avatar : generateGravatarUrl ( "timothy@example .com" ) ,
222223 timezone : "Europe/Rome" ,
223224 countryCode : "IT" ,
224225 } ,
@@ -238,7 +239,7 @@ export const populateUsersProd = async () => {
238239 emailVerified : true ,
239240 firstName : "Winnie" ,
240241 lastName : "Frontend" ,
241- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
242+ avatar : generateGravatarUrl ( "winnie@example .com" ) ,
242243 timezone : "US/Central" ,
243244 countryCode : "US" ,
244245 } ,
@@ -260,7 +261,7 @@ export const populateUsersProd = async () => {
260261 emailVerified : true ,
261262 firstName : "Cheryl" ,
262263 lastName : "Backend" ,
263- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
264+ avatar : generateGravatarUrl ( "cheryl@example .com" ) ,
264265 timezone : "Australia/Melbourne" ,
265266 countryCode : "AU" ,
266267 } ,
@@ -280,7 +281,7 @@ export const populateUsersProd = async () => {
280281 emailVerified : true ,
281282 firstName : "Curt" ,
282283 lastName : "Backend" ,
283- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
284+ avatar : generateGravatarUrl ( "curt@example .com" ) ,
284285 timezone : "US/Central" ,
285286 countryCode : "US" ,
286287 } ,
@@ -300,7 +301,7 @@ export const populateUsersProd = async () => {
300301 emailVerified : true ,
301302 firstName : "Josh" ,
302303 lastName : "Backend" ,
303- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
304+ avatar : generateGravatarUrl ( "josh@example .com" ) ,
304305 timezone : "US/Pacific" ,
305306 countryCode : "US" ,
306307 } ,
@@ -320,7 +321,7 @@ export const populateUsersProd = async () => {
320321 emailVerified : true ,
321322 firstName : "Tim" ,
322323 lastName : "Backend" ,
323- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
324+ avatar : generateGravatarUrl ( "tim@example .com" ) ,
324325 timezone : "US/Central" ,
325326 countryCode : "US" ,
326327 } ,
@@ -340,7 +341,7 @@ export const populateUsersProd = async () => {
340341 emailVerified : true ,
341342 firstName : "Arman" ,
342343 lastName : "Backend" ,
343- avatar : "https://gravatar .com/avatar/3bfaef00e02a22f99e17c66e7a9fdd31?s=400&d=robohash&r=x" ,
344+ avatar : generateGravatarUrl ( "arman@example .com" ) ,
344345 timezone : "Asia/Kolkata" ,
345346 countryCode : "IN" ,
346347 } ,
0 commit comments