Skip to content
Open
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
Binary file modified backend/backend/__pycache__/urls.cpython-310.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion backend/backend/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from django.urls import path,include

urlpatterns = [
path('admin/', admin.site.urls),
# path('admin/', admin.site.urls),

path('api/auth',include('user.urls'))

]
Binary file modified backend/db.sqlite3
Binary file not shown.
Binary file modified backend/user/__pycache__/views.cpython-310.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion backend/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def get(self ,request):
user = User.objects.get(username=request.user)
prefs = JsonHandler.objects.get(username=request.user)
data = json.dumps(prefs.data["links"])
print((data))


test = {
"username":user.username,
"email":user.email,
Expand Down
2 changes: 1 addition & 1 deletion src/app/(SSR)/logout/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Logout(){
removeCookie('token',{path:'/'})
const router = useRouter()
toast.success("redirecting...")
setTimeout(()=>router.push("/"),2000)
router.replace("/")


return <h1>You have been logged out </h1>
Expand Down
11 changes: 8 additions & 3 deletions src/app/(SSR)/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ export default function ProfilePage() {
let obj: UserData = await JSON.parse(data);

if (response.ok) {
console.log(obj)
setUserData(obj);

var d1 = JSON.parse(JSON.parse(obj.links));
console.log(typeof(d1))
setParsed(d1);
console.log(parsed)
}
} catch (error) {
console.error("Error fetching profile data:", error);
Expand Down Expand Up @@ -154,12 +157,14 @@ export default function ProfilePage() {

const copyParse = parsed;
copyParse[topic] = token;

console.log(parsed)
console.log(copyParse)
setParsed(copyParse);

userDataCopy.links = JSON.stringify(parsed);

setUserData(userDataCopy);

console.log(userData)
setStepData(copyData);
}
};
Expand Down