rippanteq7
commited on
Commit
•
35271de
1
Parent(s):
10818bc
Update index.coffee
Browse files- index.coffee +2 -2
index.coffee
CHANGED
@@ -21,7 +21,7 @@ app.use "/file", express.static tmpdir()
|
|
21 |
|
22 |
app.use (req, res, next) ->
|
23 |
time = new Date().toLocaleString "fr"
|
24 |
-
param =
|
25 |
console.log "\n[#{time}] #{req.method}: #{req.url}\n", param
|
26 |
next()
|
27 |
|
@@ -42,7 +42,7 @@ app.all "/imagine", imagineLimiter, (req, res) ->
|
|
42 |
message: STATUS_CODES["405"]
|
43 |
|
44 |
try
|
45 |
-
{ prompt } =
|
46 |
unless prompt
|
47 |
res.status(400).json
|
48 |
message: STATUS_CODES["400"]
|
|
|
21 |
|
22 |
app.use (req, res, next) ->
|
23 |
time = new Date().toLocaleString "fr"
|
24 |
+
param = Object.assign req.query, req.body
|
25 |
console.log "\n[#{time}] #{req.method}: #{req.url}\n", param
|
26 |
next()
|
27 |
|
|
|
42 |
message: STATUS_CODES["405"]
|
43 |
|
44 |
try
|
45 |
+
{ prompt } = Object.assign req.query, req.body
|
46 |
unless prompt
|
47 |
res.status(400).json
|
48 |
message: STATUS_CODES["400"]
|