Skip to content

Commit

Permalink
fix Docker Hub build fix git hash, comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Jun 18, 2021
1 parent 5bcc719 commit a2223cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mongo_data/*
certs/*
data/*
logs/*
logs/*
YYeTsFE/node_modules/*
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ RUN apk update && apk add --no-cache libressl jpeg-dev openjpeg-dev libimagequan

FROM node:alpine as nodebuilder
WORKDIR /YYeTsBot/YYeTsFE/
RUN apk add git
COPY YYeTsFE/package.json /YYeTsBot/YYeTsFE/
COPY YYeTsFE/yarn.lock /YYeTsBot/YYeTsFE/
RUN yarn
COPY YYeTsFE /YYeTsBot/YYeTsFE/
COPY . /YYeTsBot/
RUN echo "gitdir: $(pwd)/../.git/modules/YYeTsFE" > .git
RUN yarn run release


Expand Down
2 changes: 1 addition & 1 deletion YYeTsFE
4 changes: 2 additions & 2 deletions yyetsweb/Mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_comment(self, resource_id: int, page: int, size: int, **kwargs) -> dict:

count = self.db["comment"].count_documents(condition)
data = self.db["comment"].find(condition, projection={"ip": False}) \
.sort("id", pymongo.DESCENDING).limit(size).skip((page - 1) * size)
.sort("_id", pymongo.DESCENDING).limit(size).skip((page - 1) * size)
return {
"data": self.convert_objectid(list(data)),
"count": count,
Expand All @@ -150,7 +150,7 @@ def add_comment(self, captcha: str, captcha_id: int, content: str, resource_id:
verify_result = CaptchaResource().verify_code(captcha, captcha_id)
if not verify_result["status"]:
returned["status_code"] = HTTPStatus.BAD_REQUEST
returned["message"] = verify_result
returned["message"] = verify_result["message"]
return returned

exists = self.db["yyets"].find_one({"data.info.id": resource_id})
Expand Down

0 comments on commit a2223cd

Please sign in to comment.