Commit e0fdb426 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #6823 from milgner/api_expose_project_archived_status

Expose archive status of projects in API
parents 6d65afb3 61e68634
...@@ -43,7 +43,8 @@ GET /projects ...@@ -43,7 +43,8 @@ GET /projects
"owner_id": 1, "owner_id": 1,
"path": "diaspora", "path": "diaspora",
"updated_at": "2013-09-30T13: 46: 02Z" "updated_at": "2013-09-30T13: 46: 02Z"
} },
"archived": false
}, },
{ {
"id": 6, "id": 6,
...@@ -78,7 +79,8 @@ GET /projects ...@@ -78,7 +79,8 @@ GET /projects
"owner_id": 1, "owner_id": 1,
"path": "brightbox", "path": "brightbox",
"updated_at": "2013-09-30T13:46:02Z" "updated_at": "2013-09-30T13:46:02Z"
} },
"archived": false
} }
] ]
``` ```
...@@ -157,7 +159,8 @@ Parameters: ...@@ -157,7 +159,8 @@ Parameters:
"access_level": 50, "access_level": 50,
"notification_level": 3 "notification_level": 3
} }
} },
"archived": false
} }
``` ```
......
...@@ -43,6 +43,7 @@ module API ...@@ -43,6 +43,7 @@ module API
class Project < Grape::Entity class Project < Grape::Entity
expose :id, :description, :default_branch expose :id, :description, :default_branch
expose :public?, as: :public expose :public?, as: :public
expose :archived?, as: :archived
expose :visibility_level, :ssh_url_to_repo, :http_url_to_repo, :web_url expose :visibility_level, :ssh_url_to_repo, :http_url_to_repo, :web_url
expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group } expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group }
expose :name, :name_with_namespace expose :name, :name_with_namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment