Ignore:
Timestamp:
12/10/25 13:45:42 (10 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
39f76a9
Parents:
ab652ff (diff), 615f18d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Stefan Saveski <76560180+stefansaveski@…> (12/10/25 13:45:42)
git-committer:
GitHub <noreply@…> (12/10/25 13:45:42)
Message:

Merge pull request #7 from stefansaveski/feature/get-semesters

Add getSemesters endpoint and related data access

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iknow-api/Services/Implementations/UserService.cs

    rab652ff rf735dac  
    3333            else
    3434                return user;
     35        }
     36        public async Task<List<EnrolledSemesters>> GetUserSemesters(string JWT)
     37        {
     38            var userId = ExtractUserIdFromJwt(JWT);
     39            if (userId == null)
     40                return null;
     41
     42            // Now you can use userId to fetch user data
     43            var semesters = await _userRepository.GetUserSemestersAsync(userId.Value);
     44            if (semesters == null)
     45                return null;
     46            else
     47                return semesters;
    3548        }
    3649
Note: See TracChangeset for help on using the changeset viewer.