Skip to content

Commit

Permalink
Updated deprecate API endpoint users/self to current implementation /…
Browse files Browse the repository at this point in the history
…users?profile=true
  • Loading branch information
Hariom01010 committed Dec 9, 2024
1 parent cf01917 commit be8cbed
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion admin-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const loading = document.getElementById('loading');
const selectElement = document.getElementById('select-tags');
(async function setAuth() {
try {
const res = await fetch(`${API_BASE_URL}/users/self`, {
const res = await fetch(`${API_BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion applications/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function getApplicationById(applicationId) {

async function getIsSuperUser() {
try {
const res = await fetch(`${BASE_URL}/users/self`, {
const res = await fetch(`${BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion extension-requests/local-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Order = {
};
async function getSelfUser() {
try {
const res = await fetch(`${API_BASE_URL}/users/self`, {
const res = await fetch(`${API_BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion groups/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function getMembers() {
}
async function getUserSelf() {
try {
const res = await fetch(`${BASE_URL}/users/self`, {
const res = await fetch(`${BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion identity-service-logs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function showToaster(message) {

async function getIsSuperUser() {
try {
const res = await fetch(`${API_BASE_URL}/users/self`, {
const res = await fetch(`${API_BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
3 changes: 2 additions & 1 deletion mock-data/taskRequests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ const defaultMockResponseHeaders = {
};

const urlMappings = {
'https://staging-api.realdevsquad.com/users/self': superUserDetails.user,
'https://staging-api.realdevsquad.com/users?profile=true':
superUserDetails.user,
'https://api.realdevsquad.com/taskRequests/dM5wwD9QsiTzi7eG7Oq5':
individualTaskReqDetail,
'https://api.realdevsquad.com/taskRequests/dM5wwD9QsiTzi7eG7Oq6':
Expand Down
2 changes: 1 addition & 1 deletion profile/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function wantedData(data) {
}

async function getSelfUser() {
const res = await fetch(`${API_BASE_URL}/users/self`, {
const res = await fetch(`${API_BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion taskEvents/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function getUserData(username) {
}

async function getSelfDetails() {
const res = await fetch(`${API_BASE_URL}/users/self`, {
const res = await fetch(`${API_BASE_URL}/users?profile=true`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down

0 comments on commit be8cbed

Please sign in to comment.