Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c6f2abc9
Commit
c6f2abc9
authored
Apr 21, 2020
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add updated_at to todos API
parent
31372511
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
+13
-3
changelogs/unreleased/214283-add-updated-at-to-todos-api.yml
changelogs/unreleased/214283-add-updated-at-to-todos-api.yml
+5
-0
doc/api/todos.md
doc/api/todos.md
+6
-3
lib/api/entities/todo.rb
lib/api/entities/todo.rb
+1
-0
spec/requests/api/todos_spec.rb
spec/requests/api/todos_spec.rb
+1
-0
No files found.
changelogs/unreleased/214283-add-updated-at-to-todos-api.yml
0 → 100644
View file @
c6f2abc9
---
title
:
Expose the updated_at attribute in the todos API
merge_request
:
30035
author
:
type
:
changed
doc/api/todos.md
View file @
c6f2abc9
...
...
@@ -101,7 +101,8 @@ Example Response:
"target_url"
:
"https://gitlab.example.com/gitlab-org/gitlab-foss/-/merge_requests/7"
,
"body"
:
"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat."
,
"state"
:
"pending"
,
"created_at"
:
"2016-06-17T07:52:35.225Z"
"created_at"
:
"2016-06-17T07:52:35.225Z"
,
"updated_at"
:
"2016-06-17T07:52:35.225Z"
},
{
"id"
:
98
,
...
...
@@ -174,7 +175,8 @@ Example Response:
"target_url"
:
"https://gitlab.example.com/gitlab-org/gitlab-foss/-/merge_requests/7"
,
"body"
:
"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat."
,
"state"
:
"pending"
,
"created_at"
:
"2016-06-17T07:49:24.624Z"
"created_at"
:
"2016-06-17T07:49:24.624Z"
,
"updated_at"
:
"2016-06-17T07:49:24.624Z"
}
]
```
...
...
@@ -272,7 +274,8 @@ Example Response:
"target_url"
:
"https://gitlab.example.com/gitlab-org/gitlab-foss/-/merge_requests/7"
,
"body"
:
"Dolores in voluptatem tenetur praesentium omnis repellendus voluptatem quaerat."
,
"state"
:
"done"
,
"created_at"
:
"2016-06-17T07:52:35.225Z"
"created_at"
:
"2016-06-17T07:52:35.225Z"
,
"updated_at"
:
"2016-06-17T07:52:35.225Z"
}
```
...
...
lib/api/entities/todo.rb
View file @
c6f2abc9
...
...
@@ -22,6 +22,7 @@ module API
expose
:body
expose
:state
expose
:created_at
expose
:updated_at
def
todo_target_class
(
target_type
)
# false as second argument prevents looking up in module hierarchy
...
...
spec/requests/api/todos_spec.rb
View file @
c6f2abc9
...
...
@@ -235,6 +235,7 @@ describe API::Todos do
expect
(
json_response
[
'state'
]).
to
eq
(
'pending'
)
expect
(
json_response
[
'action_name'
]).
to
eq
(
'marked'
)
expect
(
json_response
[
'created_at'
]).
to
be_present
expect
(
json_response
[
'updated_at'
]).
to
be_present
end
it
'returns 304 there already exist a todo on that issuable'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment