Skip to content

Commit b74586a

Browse files
committed
fixbug
1 parent 1e5d1e8 commit b74586a

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

file_controller.cc

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ void imageUpload(const HttpRequestPtr &req, std::function<void(const HttpRespons
255255
"directory";
256256

257257
res_json["code"] = 200;
258-
res_json["message"] = timestamp ;
258+
res_json["message"] = timestamp;
259259
}
260260
}
261261
else
@@ -278,16 +278,8 @@ void getPicture(const HttpRequestPtr &req, std::function<void(const HttpResponse
278278
auto resp = HttpResponse::newFileResponse("./uploads/" + filename);
279279
resp->addHeader("Access-Control-Allow-Origin", "*");
280280

281-
if (jwtVerify(req))
282-
{
283-
res_json["code"] = 200;
284-
res_json["message"] = "Picture get success!";
285-
}
286-
else
287-
{
288-
res_json["code"] = 404;
289-
res_json["message"] = "PICTURE NOT FOUND!!!";
290-
}
281+
res_json["code"] = 200;
282+
res_json["message"] = "Picture get success!";
291283

292284
auto output = writer.write(res_json);
293285
resp->setBody(output);

0 commit comments

Comments
 (0)