Update user profile
AuthorizationBearer <token>
In: header
firstName?string
lastName?string
email?string
Format
"email"Response Body
curl -X PUT "http://localhost:3000/api/auth/profile" \
-H "Content-Type: application/json" \
-d '{}'const body = JSON.stringify({})
fetch("http://localhost:3000/api/auth/profile", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "http://localhost:3000/api/auth/profile"
body := strings.NewReader(`{}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "http://localhost:3000/api/auth/profile"
body = {}
response = requests.request("PUT", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text){
"user": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"username": "string",
"email": "user@example.com",
"firstName": "string",
"lastName": "string",
"roles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"permissions": {}
}
],
"isActive": true,
"createdAt": "2019-08-24T14:15:22Z"
}
}