Skip to content

Commit 802351d

Browse files
committed
type casting fixed due to github link being not null
1 parent 095f26a commit 802351d

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

pkg/controller/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func CreatePanel(c echo.Context) error {
300300
IsVerified: true,
301301
IsBanned: false,
302302
Gender: panel.Gender,
303-
GithubProfile: panel.GithubProfile,
303+
GithubProfile: &panel.GithubProfile,
304304
}
305305
panelDb.ID, _ = uuid.NewV7()
306306
panelDb.TeamID = uuid.NullUUID{

pkg/controller/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func CompleteProfile(c echo.Context) error {
242242
},
243243
Gender: req.Gender,
244244
RegNo: &req.RegNo,
245-
GithubProfile: req.GithubProfile,
245+
GithubProfile: &req.GithubProfile,
246246
HostelBlock: &req.HostelBlock,
247247
RoomNo: &req.RoomNo,
248248
})

pkg/controller/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func ExportUsers(c echo.Context) error {
6262
user.TeamID.UUID.String(),
6363
hostelBlock,
6464
roomNo,
65-
user.GithubProfile,
65+
&user.GithubProfile,
6666
user.Role,
6767
strconv.FormatBool(user.IsLeader),
6868
strconv.FormatBool(user.IsVerified),

pkg/controller/me.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func GetDetails(c echo.Context) error {
4242
RegNo: getSafeString(user.RegNo),
4343
PhoneNo: user.PhoneNo,
4444
Gender: user.Gender,
45-
GithubProfile: user.GithubProfile,
45+
GithubProfile: *user.GithubProfile,
4646
IsLeader: user.IsLeader,
4747
HostelBlock: hostelBlock,
4848
RoomNo: roomNo,
@@ -75,7 +75,7 @@ func GetDetails(c echo.Context) error {
7575
res.Team.Members = append(res.Team.Members, models.TeamMember{
7676
FirstName: v.FirstName,
7777
LastName: v.LastName,
78-
GithubProfile: v.GithubProfile,
78+
GithubProfile: *v.GithubProfile,
7979
IsLeader: v.IsLeader,
8080
})
8181
}
@@ -149,7 +149,7 @@ func UpdateUser(c echo.Context) error {
149149
},
150150
Gender: req.Gender,
151151
RegNo: &req.RegNo,
152-
GithubProfile: req.GithubProfile,
152+
GithubProfile: &req.GithubProfile,
153153
HostelBlock: &req.HostelBlock,
154154
RoomNo: &req.RoomNumber,
155155
})

pkg/controller/stargazer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func CheckStarred(c echo.Context) error {
4343
owner := utils.Config.RepoOwner
4444
name := utils.Config.RepoName
4545

46-
github_user := strings.Split(github_link, "github.com/")
46+
github_user := strings.Split(*github_link, "github.com/")
4747

4848
if len(github_user) != 2 {
4949
return c.JSON(http.StatusBadRequest, models.Response{

pkg/db/export.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/db/models.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/db/teams.sql.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/db/user.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)