Skip to content

Commit

Permalink
fix(merge): fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MengChiehLiu committed Aug 24, 2023
1 parent 8cdaaf3 commit 2026b79
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions backend/server/controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,8 @@ async function usersPictureUpdate(req, res) {
});


const protocol = req.protocol; // 通常是 'http' 或 'https'
const host = process.env.BACKEND_HOST; // 獲取主機名,例如 '127.0.0.1:3000'
const serverUrl = `${protocol}://${host}`;
const pictureUrl = `${serverUrl}/api/1.0/images/${path.basename(req.file.path)}`;
const pictureUrl = `https://${process.env.BACKEND_HOST}/api/1.0/images/${path.basename(req.file.path)}`;


await updateUserPicture(userId, pictureUrl);

Expand Down

0 comments on commit 2026b79

Please sign in to comment.