Skip to content

Commit

Permalink
Add seller contract button
Browse files Browse the repository at this point in the history
  • Loading branch information
yuneg11 authored Dec 11, 2019
2 parents 6edadc4 + c21049f commit 2047cb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/handlers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ const report = async (event) => {
};

const contract = async (event) => {
const userId = parser.getUserId(event);
var userId = parser.getUserId(event);
const extras = parser.getExtras(event);
if ("targetUserId" in extras) {
userId = extras["targetUserId"];
}

const contracts = await database.getTransaction(userId);
if (contracts == null) {
Expand Down
1 change: 1 addition & 0 deletions src/backend/responses/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ module.exports.itemDetail = (item, mode="list") => {
if(item.openprofile) {
resultButtons.push(builder.getButton("판매자 연결", "webLink", item.openprofile));
}
resultButtons.push(builder.getButton("판매자 거래기록", "block", "판매자 거래기록", resource.userInfoContractListBlockId, {targetUserId: item.userId}));
resultButtons.push(builder.getButton("신고", "block", "신고", resource.userReportBlockId, {targetUserId: item.userId, targetNickname: item.nickname}));
}
bodys.push(builder.getBasicCardBody(resultTitle, resultDescription, "", resultButtons));
Expand Down

0 comments on commit 2047cb4

Please sign in to comment.