mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-12 00:02:36 -05:00
Rename the endpoints.
Increase test coverage to include the encrypted message sent to the task.
This commit is contained in:
@@ -11,3 +11,10 @@ def pagination_links(pagination, endpoint, **kwargs):
|
||||
links['next'] = url_for(endpoint, page=pagination.next_num, **kwargs)
|
||||
links['last'] = url_for(endpoint, page=pagination.pages, **kwargs)
|
||||
return links
|
||||
|
||||
|
||||
def url_with_token(data, url, config):
|
||||
from notifications_utils.url_safe_token import generate_token
|
||||
token = generate_token(data, config['SECRET_KEY'], config['DANGEROUS_SALT'])
|
||||
base_url = config['ADMIN_BASE_URL'] + url
|
||||
return base_url + token
|
||||
|
||||
Reference in New Issue
Block a user