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 28
28
TimeEntryCosmosDBRepository ,
29
29
)
30
30
from time_tracker_api .database import CRUDDao , APICosmosDBDao
31
+ from time_tracker_api .security import current_user_id
31
32
32
33
33
34
class TimeEntriesDao (CRUDDao ):
Original file line number Diff line number Diff line change @@ -256,28 +256,20 @@ def post(self):
256
256
return time_entries_dao .create (ns .payload ), HTTPStatus .CREATED
257
257
258
258
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
-
264
259
@ns .route ('/latest' )
265
260
class LatestTimeEntries (Resource ):
266
261
@ns .doc ('list_latest_time_entries' )
267
- @ns .expect (attributes_filter )
268
262
@ns .marshal_list_with (time_entry )
269
263
@ns .response (HTTPStatus .NOT_FOUND , 'Time entry not found' )
270
264
def get (self ):
271
265
"""List the latest time entries"""
272
- conditions = attributes_filter .parse_args ()
273
266
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 = {})
277
268
278
269
279
270
@ns .route ('/<string:id>' )
280
271
@ns .response (HTTPStatus .NOT_FOUND , 'This time entry does not exist' )
272
+ @ns .response (HTTPStatus .UNPROCESSABLE_ENTITY , 'The id has an invalid format' )
281
273
@ns .param ('id' , 'The unique identifier of the time entry' )
282
274
class TimeEntry (Resource ):
283
275
@ns .doc ('get_time_entry' )
You can’t perform that action at this time.
0 commit comments