mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
fix bio on save
This commit is contained in:
parent
9a9724d024
commit
71b77d82af
2 changed files with 2 additions and 3 deletions
|
@ -72,7 +72,7 @@ profileRouter.get("/getProfilePicture/:username", getProfilePicture);
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* /api/profile/updateBio:
|
* /api/profile/updateBio:
|
||||||
* post:
|
* put:
|
||||||
* summary: Update user bio
|
* summary: Update user bio
|
||||||
* description: Updates the bio (short description) of the currently authenticated user.
|
* description: Updates the bio (short description) of the currently authenticated user.
|
||||||
* tags:
|
* tags:
|
||||||
|
|
|
@ -25,10 +25,9 @@ export default function BioTextField({ ownAccount, bioText, setBio } : { ownAcco
|
||||||
|
|
||||||
const saveBio = async () => {
|
const saveBio = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await api.post("http://localhost:3001/api/profile/updateBio", {
|
await api.put("/profile/updateBio", {
|
||||||
bio: bioText,
|
bio: bioText,
|
||||||
});
|
});
|
||||||
setBio(response.data.data.bio);
|
|
||||||
setEditable(false);
|
setEditable(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error saving bio: ", error);
|
console.error("Error saving bio: ", error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue