Browse Source

[FIX]

pull/278/head
viletyy 5 years ago
parent
commit
bf91c5e382
2 changed files with 15 additions and 1 deletions
  1. +8
    -1
      api_document.md
  2. +7
    -0
      app/views/apply_signatures/index.json.jbuilder

+ 8
- 1
api_document.md 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"
}
}
]


+ 7
- 0
app/views/apply_signatures/index.json.jbuilder 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

Loading…
Cancel
Save