This commit is contained in:
viletyy 2021-01-04 15:32:44 +08:00
parent 9b687f7885
commit bf91c5e382
2 changed files with 15 additions and 1 deletions

View File

@ -4099,6 +4099,9 @@ http://localhost:3000/api/apply_signatures | jq
|-- image_url |string|用户头像|
|-- email |string|用户邮箱|
|-- is_owner |boolean|是否是项目的拥有者true:是, false:不是|
|attachment |object|上传附件|
|--filename |string|附件名称|
|--path |string|附件地址|
返回值
@ -4108,7 +4111,7 @@ http://localhost:3000/api/apply_signatures | jq
"apply_signatures": [
{
"id": 18,
"status": "waiting",
"status": "passed",
"user": {
"id": 3,
"name": "16895620",
@ -4116,6 +4119,10 @@ http://localhost:3000/api/apply_signatures | jq
"image_url": "avatars/User/boy.jpg",
"email": "2456233122@qq.com",
"is_owner": false
},
"attachment": {
"filename": "PHengLEI软件开源协议.docx",
"path": "/api/attachments/23"
}
}
]

View File

@ -9,4 +9,11 @@ json.apply_signatures @apply_signatures do |signature|
json.is_owner @project.owner?(signature.user)
end
end
if signature.attachments.present?
attachment = signature.attachments.take
json.attachment do
json.filename attachment.filename
json.path attachment_path(attachment)
end
end
end