Comments (12)
是不是該考慮趁這個機會把所有 api 都重新定義過?目前 api 定義完全沒考慮前端跟 wf
目前的 api 其實開得非常糟糕,說真的前端專案我認為已經失控了
from camera-trap-api.
@trashmai 我們現在還是用 project title 來當 uniqueID 嗎?
from camera-trap-api.
I will fix it today.
from camera-trap-api.
補充 & 提醒一下,
目前已經有個 projectId (計畫編號) 是讓 user 自行 key in 且可以編輯的,
所以這邊應該是會另外產生 unique key for project 對嗎?
from camera-trap-api.
from camera-trap-api.
- 如上面 comment 所提, projectId 目前是被使用在計畫編號, 是 user 手動 key in 且可以編輯的欄位, 直接拿來作為 project key 是否適合建議再評估一下
- 權限中請協助加上 project unique key, 目前只給 title & roles 可能會 mapping 不到正確的權限
endpoint GET /ctp-user/me
from camera-trap-api.
We need to check all logic about Project.
like this:
https://github.com/TaiBIF/camera-trap-api/blob/master/common/models/project.js#L49
from camera-trap-api.
Hi both,
We should indeed review this. I'd suggest:
- change the current "projectId" to "adminProjectId" since it's user input and not mandatory
- add an automatically generated projectId field for mongoDB identity use and for /ctp-user/me alike
- update documentation.
makes sense?
from camera-trap-api.
我剛剛去掃了目前的專案後發現一堆用 projectTitle 在當作參考的邏輯,整個處理完可能需要花掉一天,包含處理資料庫內現有的資料。
我覺得用 MongoDB 給的 _id 是比較好的,id 的產生其實是一件很複雜的事情,例如兩台機器同時產生大量 id 時會不會重複...等問題,交由資料庫系統處理比較好。
就依照 @cjk-halodule 說的將現有 Project.projectId
改名成 Project.adminProjectId
,然後再開一個 Project.projectId
內容是由 MongoDB 產生的 unique id。
from camera-trap-api.
3.1.3 的欄位就應該用新創的 adminProjectId 了 - 這個也得在前端的程式中更新
其它完全同意
from camera-trap-api.
同意以上做法
@diabloevagto 前端應該也有不少地方要同步調整, 再幫忙留意一下
from camera-trap-api.
This has proceeded to nearly done. Reopen only when an issue emerges.
from camera-trap-api.
Related Issues (20)
- 修正計畫「 編輯設定」中的編輯狀態 HOT 1
- 初測延遲加上逐月的統計
- 修正篩選多物種時,只篩選出其中一種物種 HOT 2
- 上傳 csv,欄位錯誤的 error handling
- 批次上傳 Memory leak
- 帶 id 的 CSV 檔上傳,新增資料的處理
- 高海拔樣區和相機位置資料錯置 HOT 2
- 同一媒體檔案中缺漏資料的補充 HOT 1
- 敏感資料的處理
- 訂定計算結果匯出 CSV 格式
- 事業區、林班地、小區之圖籍資料
- 提供使用者判定之相機開始及結束工作時間,供計算選項考慮。
- 角況控制詞彙增加「無角」
- 計畫名稱及計畫簡稱不可重覆
- 資料分析-A. 相機工作時數 HOT 2
- 資料分析- B. 相對豐度指標的計算功能 - a: OI 值
- 資料分析- B. 相對豐度指標的計算功能 - b: 目擊事件
- 資料分析- B. 相對豐度指標的計算功能 - c: 捕獲回合比例
- 資料分析- C. 存缺(presence/absence)
- 資料分析- D. 活動機率(apparent probability of activity, APOA)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camera-trap-api.