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