@@ -14,7 +14,6 @@ const Comment = require('./resources/Comment')
14
14
module . exports = tensei ( )
15
15
. dashboardPath ( 'tensei' )
16
16
. resources ( [ Tag , Post , User , Comment ] )
17
- . database ( 'mongodb' )
18
17
. serverUrl ( 'http://localhost:5000' )
19
18
. clientUrl ( 'https://google.com' )
20
19
. defaultStorageDriver ( 'local' )
@@ -67,31 +66,31 @@ module.exports = tensei()
67
66
] ) ,
68
67
] )
69
68
. plugins ( [
70
- auth ( )
71
- . name ( 'Customer' )
72
- . twoFactorAuth ( )
73
- . verifyEmails ( )
74
- . teams ( )
75
- . apiPath ( 'auth' )
76
- . rolesAndPermissions ( )
77
- . social ( 'github' , {
78
- key : process . env . GITHUB_KEY ,
79
- secret : process . env . GITHUB_SECRET ,
80
- scope : [ 'user' , 'user:email' ] ,
81
- } )
82
- . social ( 'gitlab' , {
83
- key : process . env . GITLAB_KEY ,
84
- secret : process . env . GITLAB_SECRET ,
85
- } )
86
- . social ( 'google' , {
87
- key : process . env . GOOGLE_KEY ,
88
- secret : process . env . GOOGLE_SECRET ,
89
- } )
90
- . social ( 'linkedin' , {
91
- key : process . env . LINKEDIN_KEY ,
92
- secret : process . env . LINKEDIN_SECRET ,
93
- } )
94
- . plugin ( ) ,
69
+ // auth()
70
+ // .name('Customer')
71
+ // .twoFactorAuth()
72
+ // .verifyEmails()
73
+ // .teams()
74
+ // .apiPath('auth')
75
+ // .rolesAndPermissions()
76
+ // .social('github', {
77
+ // key: process.env.GITHUB_KEY,
78
+ // secret: process.env.GITHUB_SECRET,
79
+ // scope: ['user', 'user:email'],
80
+ // })
81
+ // .social('gitlab', {
82
+ // key: process.env.GITLAB_KEY,
83
+ // secret: process.env.GITLAB_SECRET,
84
+ // })
85
+ // .social('google', {
86
+ // key: process.env.GOOGLE_KEY,
87
+ // secret: process.env.GOOGLE_SECRET,
88
+ // })
89
+ // .social('linkedin', {
90
+ // key: process.env.LINKEDIN_KEY,
91
+ // secret: process.env.LINKEDIN_SECRET,
92
+ // })
93
+ // .plugin(),
95
94
trix ( ) ,
96
95
// cashier()
97
96
// .customerResourceName('Customer')
@@ -102,30 +101,18 @@ module.exports = tensei()
102
101
// ])
103
102
// .plugin(),
104
103
graphql ( ) . plugin ( ) ,
105
- plugin ( 'Custom Slug Validation' ) . setup (
106
- ( { indicative } ) => {
107
- indicative . validator . extend ( 'slug' , {
108
- async : false ,
109
- validate ( data , field , args , config ) {
110
- return data . original [ field ] . match (
111
- / ^ [ a - z 0 - 9 ] + (?: - [ a - z 0 - 9 ] + ) * $ /
112
- )
113
- } ,
114
- } )
115
- }
116
- ) ,
104
+ plugin ( 'Custom Slug Validation' ) . setup ( ( { indicative } ) => {
105
+ indicative . validator . extend ( 'slug' , {
106
+ async : false ,
107
+ validate ( data , field , args , config ) {
108
+ return data . original [ field ] . match (
109
+ / ^ [ a - z 0 - 9 ] + (?: - [ a - z 0 - 9 ] + ) * $ /
110
+ )
111
+ } ,
112
+ } )
113
+ } ) ,
117
114
] )
118
- . databaseConfig ( 'mongodb://localhost/tensei-y' , {
119
- useUnifiedTopology : true ,
120
- useNewUrlParser : true ,
115
+ . databaseConfig ( {
116
+ type : 'mysql' ,
117
+ dbName : 'mikrotensei' ,
121
118
} )
122
- // .databaseConfig({
123
- // client: 'mysql',
124
- // connection: {
125
- // host: '127.0.0.1',
126
- // user: 'root',
127
- // pass: '',
128
- // database: 'flmg',
129
- // },
130
- // debug: true,
131
- // })
0 commit comments