@@ -29,7 +29,7 @@ router.get('/signup', (req, res) => {
29
29
30
30
router . get ( '/projects/:project_id' , async ( req , res ) => {
31
31
const exists = await projectExists ( req . params . project_id ) ;
32
- sendHtml ( req , res , exists ) ;
32
+ await sendHtml ( req , res , exists ) ;
33
33
} ) ;
34
34
35
35
router . get (
@@ -39,7 +39,7 @@ router.get(
39
39
req . params . username ,
40
40
req . params . project_id
41
41
) ;
42
- sendHtml ( req , res , exists ) ;
42
+ await sendHtml ( req , res , exists ) ;
43
43
}
44
44
) ;
45
45
@@ -52,26 +52,26 @@ router.get('/:username/sketches/:project_id', async (req, res) => {
52
52
if ( project . exists ) {
53
53
res . send ( renderProjectIndex ( req . params . username , project . userProject . name ) ) ;
54
54
} else {
55
- sendHtml ( req , res , project . exists ) ;
55
+ await sendHtml ( req , res , project . exists ) ;
56
56
}
57
57
} ) ;
58
58
59
59
router . get ( '/:username/sketches' , async ( req , res ) => {
60
60
const exists = await userExists ( req . params . username ) ;
61
- sendHtml ( req , res , exists ) ;
61
+ await sendHtml ( req , res , exists ) ;
62
62
} ) ;
63
63
64
64
router . get ( '/:username/full/:project_id' , async ( req , res ) => {
65
65
const exists = await projectForUserExists (
66
66
req . params . username ,
67
67
req . params . project_id
68
68
) ;
69
- sendHtml ( req , res , exists ) ;
69
+ await sendHtml ( req , res , exists ) ;
70
70
} ) ;
71
71
72
72
router . get ( '/full/:project_id' , async ( req , res ) => {
73
73
const exists = await projectExists ( req . params . project_id ) ;
74
- sendHtml ( req , res , exists ) ;
74
+ await sendHtml ( req , res , exists ) ;
75
75
} ) ;
76
76
77
77
router . get ( '/login' , ( req , res ) => {
@@ -119,7 +119,7 @@ router.get('/:username/assets', async (req, res) => {
119
119
const exists = await userExists ( req . params . username ) ;
120
120
const isLoggedInUser = req . user && req . user . username === req . params . username ;
121
121
const canAccess = exists && isLoggedInUser ;
122
- sendHtml ( req , res , canAccess ) ;
122
+ await sendHtml ( req , res , canAccess ) ;
123
123
} ) ;
124
124
125
125
router . get ( '/account' , ( req , res ) => {
@@ -139,12 +139,12 @@ router.get('/:username/collections/:id', async (req, res) => {
139
139
req . params . username ,
140
140
req . params . id
141
141
) ;
142
- sendHtml ( req , res , exists ) ;
142
+ await sendHtml ( req , res , exists ) ;
143
143
} ) ;
144
144
145
145
router . get ( '/:username/collections' , async ( req , res ) => {
146
146
const exists = await userExists ( req . params . username ) ;
147
- sendHtml ( req , res , exists ) ;
147
+ await sendHtml ( req , res , exists ) ;
148
148
} ) ;
149
149
150
150
router . get ( '/privacy-policy' , ( req , res ) => {
0 commit comments