我制定了更新用戶個人資料資料的路線 我使用了這個解決方案
Router.route("/login").post(userController.Login);
Router.route("/register").post(userController.Register);
Router.route("/profile/update/cover").patch(userController.UpdateProfileCover);
Router.route("/profile/update/details").patch(
userController.UpdateProfileDetails
);
Router.route("/profile/update/photo").patch(userController.UpdateProfilePhoto);
Router.route("/profile/update/email").patch(userController.UpdateProfileEmail);
Router.route("/profile/update/password").patch(
userController.UpdateProfilePassword
);
該應用程式將允許用戶上傳圖片并驗證電子郵件和密碼
對于這種情況,這是一種好的做法還是有其他選擇
uj5u.com熱心網友回復:
您基本上是在執行以下操作
SELECT entity from User -> Validate->Update User's Entity
每次用戶呼叫 API 時,為什么不在您的 UI 上添加保存按鈕并一次發送所有更改,這將有助于減少查詢和所需的資源,這在您擴展時尤其重要。
除此之外是可以接受的。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/534602.html
標籤:数据库节点.js表示轮廓
