Filter index of subscriptions by deleted
Will request all active and only deleted subs that were done within past 90 days. closes PLAT-4945 Test Plan: - test this with commit https://gerrit.instructure.com/211181 - Ensure you have at least one sub that is deleted over 90 days ago (edit ddb if needed) - See that the index does not show that sub Change-Id: I9d87415c67d80f1a5de5c919aca67ee1db6a002c Reviewed-on: https://gerrit.instructure.com/211183 Reviewed-by: Xander Moffatt <xmoffatt@instructure.com> Tested-by: Jenkins QA-Review: Xander Moffatt <xmoffatt@instructure.com> Product-Review: Marc Phillips <mphillips@instructure.com>
This commit is contained in:
parent
a159af4d52
commit
544144542d
|
@ -152,7 +152,7 @@ module Lti
|
|||
#
|
||||
# @argument subscription[TransportType] [Optional, String]
|
||||
# Must be either 'sqs' or 'https'.
|
||||
#
|
||||
#
|
||||
# @argument subscription[State] [Optional, String]
|
||||
# Must be either 'Active' or 'Deleted"
|
||||
#
|
||||
|
@ -180,12 +180,14 @@ module Lti
|
|||
# You can retrieve the next result set by setting a 'StartKey' header in your next request
|
||||
# with the value of the 'EndKey' header in the response.
|
||||
#
|
||||
# Note that this will return all active subscription and the last 90 days of deleted subscriptions.
|
||||
#
|
||||
# Example use of a 'StartKey' header object:
|
||||
# { "Id":"71d6dfba-0547-477d-b41d-db8cb528c6d1","OwnerId":"domain.instructure.com" }
|
||||
#
|
||||
# @returns DataServiceSubscription
|
||||
def index
|
||||
response = Services::LiveEventsSubscriptionService.index(jwt_body)
|
||||
response = Services::LiveEventsSubscriptionService.index(jwt_body, query: { limit_deleted: 90 })
|
||||
forward_service_response(response)
|
||||
end
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@ module Services
|
|||
request(:delete, "/api/subscriptions/#{subscription_id}", options)
|
||||
end
|
||||
|
||||
def index(jwt_body, opts = {})
|
||||
options = { headers: headers(jwt_body, opts) }
|
||||
def index(jwt_body, opts = {}, query: {})
|
||||
options = { headers: headers(jwt_body, opts), query: query }
|
||||
request(:get, '/api/root_account_subscriptions', options)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue