Skip to content

Commit

Permalink
Merge pull request #91 from msrjr91/mei
Browse files Browse the repository at this point in the history
update profile
  • Loading branch information
msrjr91 committed Mar 23, 2023
2 parents 04a4050 + aba2d9b commit 35a43ec
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 311 deletions.
2 changes: 2 additions & 0 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { CheckSession } from './services/auth'
import './styles/App.css'
import { DataContext } from './DataContext'
import { RegisterUser } from './services/auth'
import UpdateProfile from './pages/UpdateProfile'

import Profile from './pages/Profile'

Expand Down Expand Up @@ -158,6 +159,7 @@ const App = () => {
<Route path="/profile" element=
{<Profile user={user}
authenticated={authenticated}/>} />
<Route path="/update" element={<UpdateProfile user={user}/>}/>
</Routes>
</main>
</div>
Expand Down
6 changes: 4 additions & 2 deletions client/src/pages/UpdateProfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { useState } from 'react'
import { UpdateUser } from '../services/auth.js'
import { useNavigate } from 'react-router-dom'
import axios from 'axios'

const UpdateProfile = () => {
const UpdateProfile = (props) => {
const URL = `http://localhost:3001/`

let navigate = useNavigate()

Expand All @@ -19,7 +21,7 @@ const UpdateProfile = () => {

const handleSubmit = async (e) => {
e.preventDefault()
await UpdateUser({
await axios.put(`${URL}users/${props.user.user.id}`,{
name: formValues.name,
email: formValues.email,
passwordInput: formValues.password,
Expand Down
14 changes: 0 additions & 14 deletions server/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified server/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node
Binary file not shown.
22 changes: 0 additions & 22 deletions server/node_modules/fsevents/LICENSE

This file was deleted.

83 changes: 0 additions & 83 deletions server/node_modules/fsevents/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions server/node_modules/fsevents/fsevents.d.ts

This file was deleted.

82 changes: 0 additions & 82 deletions server/node_modules/fsevents/fsevents.js

This file was deleted.

Binary file removed server/node_modules/fsevents/fsevents.node
Binary file not shown.
62 changes: 0 additions & 62 deletions server/node_modules/fsevents/package.json

This file was deleted.

0 comments on commit 35a43ec

Please sign in to comment.