Lines 1-27javascript
1import App from '@live-change/framework';
3export default async function (services) {
4 const user = '[testUser]';
5 const email = 'tester@test.com';
6 const email2 = 'tester2@test.com';
7 const password = 'Testy123';
MediumSecret Pattern
Package contains a possible secret pattern.
dist/server/init.jsView on unpkg · L7 8 const session = 'GOzz0WylRDklhLCSppS6bwRYUeIQJqzt';
9 //console.log("MDL", services.passwordAuthentication.models.PasswordAuthentication)
10 const passwordHash = services.passwordAuthentication.models.PasswordAuthentication
11 .definition.properties.passwordHash.preFilter(password);
12 await services.user.models.User.create({ id: user, roles: [] });
13 await services.passwordAuthentication.models.PasswordAuthentication.create({ id: user, user, passwordHash });
14 await services.email.models.Email.create({ id: email, email, user });
15 await services.email.models.Email.create({ id: email2, email: email2, user });
16 await services.user.models.AuthenticatedUser.create({ id: session, session, user });
17 await services.notification.models.NotificationSetting.create({
18 id: App.encodeIdentifier(['email_Email', email, 'example_TestNotification', 'example_TestNotification']),
19 contactType: 'email_Email',
21 notificationType: 'example_TestNotification',
22 notification: 'example_TestNotification',
24 lastChanged: new Date()
26 await services.notification.models.Notification.create({
27 id: app.generateUid(),