feat: Add header for admin .

This commit is contained in:
2025-10-30 11:29:07 +05:30
parent 7e7cb12e01
commit 96b505a38c
4 changed files with 7 additions and 2 deletions

View File

@@ -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',

View File

@@ -49,6 +49,7 @@ export default function ViewUserRights() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "Admin",
Authorization: `Bearer ${token}`,
},
}

View File

@@ -31,6 +31,7 @@ export default function Login() {
method: 'GET',
headers: {
'Content-Type': 'application/json',
"X-Login-Type": "Admin",
'Authorization': `Bearer ${token}`
},
});

View File

@@ -64,6 +64,7 @@ export default function Login() {
method: 'POST',
headers: {
'Content-Type': 'application/json',
"X-Login-Type": "Admin",
},
body: JSON.stringify({
userName: userName,