dispay message in searchcard
This commit is contained in:
@@ -15,24 +15,21 @@ export async function PATCH(req: NextRequest) {
|
||||
const data = await req.json()
|
||||
const { firstName, lastName, email, phone_number, country, city } = data
|
||||
|
||||
const response = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/account/change_main_data/`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${session.accessToken}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
phone_number,
|
||||
country,
|
||||
city,
|
||||
}),
|
||||
}
|
||||
)
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/account/change_main_data/`, {
|
||||
method: 'PATCH',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${session.accessToken}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
phone_number,
|
||||
country,
|
||||
city,
|
||||
}),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json()
|
||||
|
||||
@@ -12,16 +12,13 @@ export async function GET(req: NextRequest) {
|
||||
})
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/account/routes/`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${session.accessToken}`,
|
||||
},
|
||||
}
|
||||
)
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/account/routes/`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${session.accessToken}`,
|
||||
},
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const error = await response.json()
|
||||
|
||||
Reference in New Issue
Block a user