feat: persist club and center likes in postgresql database

This commit is contained in:
Amudieshwar
2026-08-19 08:31:12 +05:30
parent f8ca5a3368
commit 5f3b3f5973
7 changed files with 315 additions and 5 deletions

View File

@@ -74,8 +74,12 @@ export default function StudentDashboard() {
setLoginError(null);
try {
const session = await loginWithIms(regNumberInput.trim(), passwordInput.trim());
setImsSession(session);
const res = await loginWithIms(regNumberInput.trim(), passwordInput.trim());
if (res.success && res.token && res.student) {
setImsSession({ token: res.token, student: res.student });
} else {
setLoginError(res.message || 'Invalid credentials or Register Number not found.');
}
} catch (err: any) {
setLoginError(err.message || 'Invalid credentials or Register Number not found.');
} finally {