🚦Submit for review

As a developer, I want to submit a task for review when I'm done with the work.

Input parameters

  • taskId
  • comment

How to call from app

HTTP request to: /submit-task-for-review/TASKID

import { httpsCallable } from 'firebase/functions';

await httpsCallable(functions, 'submitTaskForReview')({ 
    taskId: task.id,
    comment: comment
})

Logic

  1. The frontend (app.tasksource.io) calls the API endpoint

  2. the backend should now set a field in the task document (submittedForReview = true)

  3. Send First Email:

    • to_email_adress = email_of_assigned_person

    • template_name = "tasks-submitted-for-review->developer"

    • data = {taskData: taskData, taskId: taskId, comment: comment}

  4. Send Second Email:

    • to_email_adress = email_of_task_creator

    • template_name = "tasks-submitted-for-review->creator"

    • data = {taskData: taskData, taskId: taskId, comment: comment}

Last updated