feat: Add header for admin .
This commit is contained in:
@@ -55,6 +55,7 @@ export default function UserConfiguration() {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
"X-Login-Type": "Admin",
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -117,6 +118,7 @@ export default function UserConfiguration() {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
"X-Login-Type": "Admin",
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
@@ -132,7 +134,7 @@ export default function UserConfiguration() {
|
|||||||
// Registration case
|
// Registration case
|
||||||
await fetch('/api/otp/send', {
|
await fetch('/api/otp/send', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json',"X-Login-Type": "Admin", },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
mobileNumber: userDetails.mobile,
|
mobileNumber: userDetails.mobile,
|
||||||
type: 'REGISTRATION',
|
type: 'REGISTRATION',
|
||||||
@@ -149,7 +151,7 @@ export default function UserConfiguration() {
|
|||||||
// Rights update case
|
// Rights update case
|
||||||
await fetch('/api/otp/send', {
|
await fetch('/api/otp/send', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json',"X-Login-Type": "Admin", },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
mobileNumber: userDetails.mobile,
|
mobileNumber: userDetails.mobile,
|
||||||
type: 'RIGHT_UPDATE',
|
type: 'RIGHT_UPDATE',
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ export default function ViewUserRights() {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
"X-Login-Type": "Admin",
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export default function Login() {
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
"X-Login-Type": "Admin",
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export default function Login() {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
"X-Login-Type": "Admin",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
userName: userName,
|
userName: userName,
|
||||||
|
|||||||
Reference in New Issue
Block a user