department-of-veterans-affairs / notification-api

Notification API
MIT License
16 stars 8 forks source link

SPIKE (todo comment): Rename method (and endpoint) #890

Open trevor2718 opened 1 year ago

trevor2718 commented 1 year ago

User Story - Business Goal

User Story(ies)

The code base is littered with TODOs. This TODO concerns renaming a method and an endpoint in /app/template_statistics/rest.py

Determine if this is necessary or not.

If so, create a new ticket detailing the work necessary and put that ticket number in that comment. If not, remove that TODO comment.

As a VANotify I want to clean up TODO comments So that the codebase is tidy and development straightforward.

Additional Info and Resources

TODO: Rename method (and endpoint?)

@template_statistics.route('/<template_id>')
def get_template_statistics_for_template_id(service_id, template_id):
    template = dao_get_template_by_id_and_service_id(template_id, service_id)

    data = None
    notification = dao_get_last_template_usage(template_id, template.template_type, template.service_id)
    if notification:
        data = notification_with_template_schema.dump(notification).data

    return jsonify(data=data)

Acceptance Criteria & Checklist

Completed research addresses the problems and/or answers the questions below:

  1. Why would this method and endpoint need to be renamed?
  2. Does Strike use this endpoint to display template statistics?
mjones-oddball commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @EvanParish @k-macmillan @kalbfled @trevor2718 @jakehova @cris-oddball @ianperera

mjones-oddball commented 1 year ago

Please add your planning poker estimate with Zenhub @justaskdavidb2