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

View File

@@ -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}`,
}, },
} }

View File

@@ -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}`
}, },
}); });

View File

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