a2n-seattle / a2n-seattle/rms-app

Subtask 3: Change APIs to support new fields

未關閉
#247 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
task
主要語言
TypeScript
星號
1
分支
1
平均合併
27 分鐘
30 天內合併 PR
4

描述

Story Points: 3

# How?

3. Change APIs to point to do basic CRUD operations. (Don't be worried about router implementation)
- `amplify/ts-code/src/db/MainTable.ts`
- Add new fields to `create` function.
- `amplify/ts-code/src/db/ItemTable.ts`
- Add new fields to `create` function.
- Change `key` input in `update` function to only allow `notes` to be changed.
- Add `returnTime` to be a expected input to `changeBorrower`
- Fill `borrowTime` and `returnTime` fields on borrow
- Empty `borrowTime` and `returnTime` fields on return
- `amplify/ts-code/src/db/BatchTable.ts`
- Change to point to main table instead of item table
- Only works because batch table is empty right now.
- `amplify/ts-code/src/api/AddItem.ts` to recieve and add to new fields

More details in https://github.com/a2n-seattle/rms-app/issues/244

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

先閱讀父 issue #244 以了解上下文。這項工作涉及更新 amplify/ts-code/src/db/ 下的三個 TypeScript 檔案(MainTable.ts、ItemTable.ts、BatchTable.ts)中的 CRUD 函式,以及一個 API 檔案(AddItem.ts)。檢查現有的 create、update 和 changeBorrower 函式,以了解目前的 schema。在 BatchTable.ts 中,將對 item table 的參照更新為對 main table 的參照。執行這些模組現有的所有測試來測試變更。完成條件是:API 能夠按照指定接受並處理新欄位(borrowTime、returnTime、notes)。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, typescript
領域
api, backend, databases
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。