Skip to content

Commit

Permalink
updated the firebase api with parameter information for the new delet…
Browse files Browse the repository at this point in the history
…eItem function
  • Loading branch information
bbland1 committed Sep 23, 2024
1 parent f5cde9a commit 9bdf507
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@ This function takes user-provided data and uses it to update an exiting item in

### `deleteItem`

🚧 To be completed! 🚧
This function takes the path of a list and removes the item passed to the function from that list.

| Parameter | Type | Description |
| ------------------------ | ----------------------------- | --------------------------------------------------------------------------------------- |
| `listPath` | `string` | The Firestore path of the list to which the item will be added. |
| `item.id` | `string` | A unique identifier of the item generated by firebase when it is added to the database. |
| `item.name` | `string` | The name of the item. |
| `item.dateLastPurchased` | `FirebaseTimestamp` or `null` | The date the item was last purchased, `null` when item first added. |
| `item.dateNextPurchased` | `FirebaseTimestamp` | The date the item is predicted to be purchased by next. |
| `item.totalPurchases` | `number` | The total number of times the item has been purchased. |
| `item.dateCreated` | `FirebaseTimestamp` | The date the item was added to the user's list. |

### `comparePurchaseUrgency`

Expand Down

0 comments on commit 9bdf507

Please sign in to comment.