Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated deprecated API endpoint from /users/self to /users?profile=true #960

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading