File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
const express = require ( 'express' ) ;
2
2
const router = express . Router ( ) ;
3
+ const Users = require ( '../models' ) . users ;
4
+ const Erds = require ( '../models' ) . erds ;
5
+ const ErdCommits = require ( '../models' ) . erd_commits ;
6
+ const SharedErds = require ( '../models' ) . shared_erds ;
7
+ const SharedUsers = require ( '../models' ) . shared_users ;
8
+ const Shared = require ( '../models' ) . shared ;
3
9
4
10
/* GET home page. */
5
11
router . get ( '/' , function ( req , res , next ) {
6
12
res . render ( 'index' , { title : 'Express' } ) ;
7
13
} ) ;
8
14
15
+ router . get ( 'invite/:email/:userId/:sharedId' , function ( req , res , next ) {
16
+ const email = req . params . email ;
17
+ const userId = req . params . userId ;
18
+ const sharedId = req . params . sharedId ;
19
+ SharedUsers . create ( {
20
+ user_id :userId ,
21
+ shared_id :sharedId
22
+ } ) . then ( result => {
23
+ res . redirect ( 'https://autosql.ga' ) ;
24
+ } )
25
+ // res.json({ email: email, userId: userId, sharedId: sharedId });
26
+ } ) ;
27
+
9
28
10
29
11
30
You can’t perform that action at this time.
0 commit comments