From 08ce68298053a34126c86f96693825cfa7d7146f Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 12 Dec 2023 09:53:28 +0100 Subject: [PATCH] rename id to user_id --- frontend/static/js/api/profile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/static/js/api/profile.js b/frontend/static/js/api/profile.js index 4ecdab9..3f4aea7 100644 --- a/frontend/static/js/api/profile.js +++ b/frontend/static/js/api/profile.js @@ -8,19 +8,19 @@ class Profile this.user_id = user_id } - async init(id) + async init(user_id) { - let response = await this.client._get(`/api/profiles/${id}`); + let response = await this.client._get(`/api/profiles/${user_id}`); let response_data = await response.json(); - this.id = id; + this.user_id = user_id; this.username = response_data.username; this.avatar_url = response_data.avatar_url; } async change_avatar(form_data) { - let response = await this.client._patch_file(`/api/profiles/${this.id}`, form_data); + let response = await this.client._patch_file(`/api/profiles/${this.user_id}`, form_data); let response_data = await response.json() return response_data;