You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we poll Workspace budget invoices using the /poll/invoices/{uuid} route, to achieve this a user has to click the Manage button on a single Workspace on the sphinx-tribes frontend app before the Workspace budget can be updated.
Design
We want to create a new endpoint /poll/{user_pubkey}/workspaces/invoices, that will add the functionality of updating the Workspaces budget on the Workspace list on the front end. The user will not have to click on a single Workspace to get the revised budget.
To Achieve This:
We will get the user public key from the route params
Search for all the workspaces the user is an admin or has the Role to view workspace budget
Then will loop through all the pending invoices that are not expired, if the invoice is paid we will add the invoice amount to the workspace budget.
If the invoice is not paid and expired we will prune the invoice from the invoice_lists table
if the invoice has not been paid, and hasn't expired, we will keep the invoice on the invoice_lists table.
Context
Currently, we poll
Workspace
budget invoices using the/poll/invoices/{uuid}
route, to achieve this a user has to click theManage
button on a single Workspace on the sphinx-tribes frontend app before the Workspace budget can be updated.Design
We want to create a new endpoint
/poll/{user_pubkey}/workspaces/invoices
, that will add the functionality of updating the Workspaces budget on the Workspace list on the front end. The user will not have to click on a single Workspace to get the revised budget.To Achieve This:
invoice_lists
tableinvoice_lists
table.This Issue is blocked by Issue #1679.
Acceptance Criteria
Here is an example backend test
The text was updated successfully, but these errors were encountered: