Closed takidog closed 4 years ago
單純送qrcode上面的資訊而已
單純送qrcode上面的資訊而已
跟巡邏箱一樣ㄇ 拍下來在家裡自己掃(?
單純送qrcode上面的資訊而已
跟巡邏箱一樣ㄇ 拍下來在家裡自己掃(?
度 但是當然不建議這樣搞
單純送qrcode上面的資訊而已
跟巡邏箱一樣ㄇ 拍下來在家裡自己掃(?
度 但是當然不建議這樣搞
可能是我把它想得太高級了
預期App會加入一些限制
POST
/event
data
{
"data":{url}
}
關於path我沒什麼頭緒 這樣應該可以 QR掃描後的東西直接往後端傳送就可以了
200成功 400失敗 500異常錯誤 503學校方timeout
401 校務通後端token過期或是失效 403 禁止使用
POST
/event
data{ "data":{url} }
關於path我沒什麼頭緒 這樣應該可以 QR掃描後的東西直接往後端傳送就可以了
200成功 400失敗 500異常錯誤 503學校方timeout
401 校務通後端token過期或是失效 403 禁止使用
需要再補一個 非上課時間的錯誤 理論上系統會去看你的課表 來判斷現在可不可以打卡 有其他的就以此類推
另外 data應該只是個string?
因為我現在沒有辦法捕捉所有的錯誤
status code統一用500 再透過body回傳哪一種錯誤
像是
leaves/submit
的400一樣
前端的alert 直接顯示錯誤的description
不知道這樣行不行
{
"code": 530,
"description": "Not in class time"
}
補充
那是那套系統的response
{"status":"error","data":"查無此座位"}
我可以直接把description
直接顯示他的錯誤
這樣好了 除了400、403我會用內建的回傳資訊 其他我才會直接回傳 description API 回傳統一使用這個
{
"code": 530,
"description": "Not in class time"
}
feature/qr_check_in
暫時使用,可能沒有合併的必要 先關閉
除課堂QR code掃描之外 也許會同時有多個需要掃QR code的服務
應該要像請假系統可以讓使用者選擇對應的服務(? e.g.
GET
/xxx/info
POST
orPUT
/xxx/xxx?service_id=abcd123
request bodyservice_id 看要放在內requests內還是query string