Skip to content

Commit

Permalink
Updated deprecated API endpoint from /users/self to /users?profile=tr…
Browse files Browse the repository at this point in the history
…ue (#960)
  • Loading branch information
Hariom01010 authored Dec 8, 2024
1 parent 9999f46 commit e8066ab
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/adapters/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export default class UserAdapter extends ApplicationAdapter {
}

urlForUpdateRecord() {
return `${this.host}/users/self`;
return `${this.host}/users?profile=true`;
}
}
2 changes: 1 addition & 1 deletion app/components/debug-grids.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class DebugGridsComponent extends Component {
const previousState = target.checked;

try {
const response = await fetch(`${APPS.API_BACKEND}/users/self?dev=true`, {
const response = await fetch(`${APPS.API_BACKEND}/users?profile=true`, {
method: 'PATCH',
credentials: 'include',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/goto.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class GotoController extends Controller {
}

async getSelfUser() {
const response = await fetch(`${APPS.API_BACKEND}/users/self`, {
const response = await fetch(`${APPS.API_BACKEND}/users?profile=true`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion app/routes/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class IntroRoute extends Route {
let userResponse;
let userData;

userResponse = await fetch(`${APPS.API_BACKEND}/users/self`, {
userResponse = await fetch(`${APPS.API_BACKEND}/users?profile=true`, {
credentials: 'include',
});
userData = await userResponse.json();
Expand Down
2 changes: 1 addition & 1 deletion app/services/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class LoginService extends Service {

checkAuth() {
//TODO: try working this with ember-data
fetch(`${APPS.API_BACKEND}/users/self`, {
fetch(`${APPS.API_BACKEND}/users?profile=true`, {
credentials: 'include',
headers: this.buildHeaders(),
})
Expand Down

0 comments on commit e8066ab

Please sign in to comment.