File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
time_tracker_api/time_entries Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 2828 TimeEntryCosmosDBRepository ,
2929)
3030from time_tracker_api .database import CRUDDao , APICosmosDBDao
31+ from time_tracker_api .security import current_user_id
3132
3233
3334class TimeEntriesDao (CRUDDao ):
Original file line number Diff line number Diff line change @@ -256,28 +256,20 @@ def post(self):
256256 return time_entries_dao .create (ns .payload ), HTTPStatus .CREATED
257257
258258
259- # TODO: Once this endpoint is working as expected in prod, review and
260- # remove unnecessary filter args. As we are using same attributes_filter
261- # as the get_all endpoint and some of the args are unnecessary for this endpoint.
262-
263-
264259@ns .route ('/latest' )
265260class LatestTimeEntries (Resource ):
266261 @ns .doc ('list_latest_time_entries' )
267- @ns .expect (attributes_filter )
268262 @ns .marshal_list_with (time_entry )
269263 @ns .response (HTTPStatus .NOT_FOUND , 'Time entry not found' )
270264 def get (self ):
271265 """List the latest time entries"""
272- conditions = attributes_filter .parse_args ()
273266
274- return time_entries_dao .get_lastest_entries_by_project (
275- conditions = conditions
276- )
267+ return time_entries_dao .get_lastest_entries_by_project (conditions = {})
277268
278269
279270@ns .route ('/<string:id>' )
280271@ns .response (HTTPStatus .NOT_FOUND , 'This time entry does not exist' )
272+ @ns .response (HTTPStatus .UNPROCESSABLE_ENTITY , 'The id has an invalid format' )
281273@ns .param ('id' , 'The unique identifier of the time entry' )
282274class TimeEntry (Resource ):
283275 @ns .doc ('get_time_entry' )
You can’t perform that action at this time.
0 commit comments