Skip to content

Commit

Permalink
Merge branch 'main' into SAC-Club-Point-Of-Contact-CRUD-3
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley authored Feb 19, 2024
2 parents 2bbcf7e + cf87502 commit f018c3a
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 82 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "backend/**"
- ".github/workflows/backend.yml"
pull_request:
types: opened
types: [opened]
paths:
- "backend/**"
- ".github/workflows/backend.yml"
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -79,7 +79,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "backend/**"
- ".github/workflows/backend_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "backend/**"
- ".github/workflows/backend_codeql.yml"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "cli/**"
- ".github/workflows/cli.yml"
pull_request:
types: opened
types: [opened]
paths:
- "cli/**"
- ".github/workflows/cli.yml"
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Cache Go Modules
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "cli/**"
- ".github/workflows/cli_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "cli/**"
- ".github/workflows/cli_codeql.yml"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
go-version: "1.22"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mobile_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "frontend/sac-mobile/**"
- ".github/workflows/mobile_codeql.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "frontend/sac-web/**"
- ".github/workflows/mweb_codeql.yml"
pull_request:
types: opened
types: [opened]
paths:
- "frontend/sac-web/**"
- ".github/workflows/web_codeql.yml"
Expand Down
12 changes: 6 additions & 6 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ module github.com/GenerateNU/sac/backend
go 1.22.0

require (
github.com/garrettladley/mattress v0.2.2
github.com/garrettladley/mattress v0.3.2
github.com/go-playground/validator/v10 v10.18.0
github.com/goccy/go-json v0.10.2
github.com/gofiber/fiber/v2 v2.52.0
github.com/gofiber/swagger v1.0.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.6.0
github.com/h2non/gock v1.2.0
github.com/huandu/go-assert v1.1.6
github.com/mcnijman/go-emailaddress v1.1.1
github.com/mitchellh/mapstructure v1.5.0
github.com/spf13/viper v1.18.2
github.com/swaggo/swag v1.16.3
gorm.io/driver/postgres v1.5.4
gorm.io/gorm v1.25.6
golang.org/x/crypto v0.19.0
golang.org/x/text v0.14.0
gorm.io/driver/postgres v1.5.6
gorm.io/gorm v1.25.7
)

require (
github.com/awnumar/memcall v0.2.0 // indirect
github.com/awnumar/memguard v0.22.4 // indirect
github.com/h2non/gock v1.2.0 // indirect
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
)

Expand Down Expand Up @@ -55,8 +57,6 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/awnumar/memcall v0.2.0 // indirect
github.com/awnumar/memguard v0.22.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
Expand Down
7 changes: 3 additions & 4 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/garrettladley/mattress v0.2.2 h1:kL/AvDmas6DaAweHwdsm3IosY9zJIGj2uO+byxzhyrU=
github.com/garrettladley/mattress v0.2.2/go.mod h1:OWKIRc9wC3gtD3Ng/nUuNEiR1TJvRYLmn/KZYw9nl5Q=
github.com/garrettladley/mattress v0.3.2 h1:JsWsEwjXzlJXX7F/Zzmq7Xby1VAwzTJGGvf7DXPj4Jk=
github.com/garrettladley/mattress v0.3.2/go.mod h1:OWKIRc9wC3gtD3Ng/nUuNEiR1TJvRYLmn/KZYw9nl5Q=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
Expand Down Expand Up @@ -147,6 +147,7 @@ github.com/mcnijman/go-emailaddress v1.1.1 h1:AGhgVDG3tCDaL0/Vc6erlPQjDuDN3dAT7r
github.com/mcnijman/go-emailaddress v1.1.1/go.mod h1:5whZrhS8Xp5LxO8zOD35BC+b76kROtsh+dPomeRt/II=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
Expand Down Expand Up @@ -237,9 +238,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/postgres v1.5.4/go.mod h1:Bgo89+h0CRcdA33Y6frlaHHVuTdOf87pmyzwW9C/BH0=
gorm.io/driver/postgres v1.5.6 h1:ydr9xEd5YAM0vxVDY0X139dyzNz10spDiDlC7+ibLeU=
gorm.io/driver/postgres v1.5.6/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
gorm.io/gorm v1.25.6/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A=
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
3 changes: 0 additions & 3 deletions backend/src/controllers/club.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package controllers

import (
"fmt"

"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
Expand All @@ -24,7 +22,6 @@ func (cl *ClubController) GetAllClubs(c *fiber.Ctx) error {
queryParams.Page = 1 // default page

if err := c.QueryParser(&queryParams); err != nil {
fmt.Println(err)
return errors.FailedtoParseQueryParams.FiberError(c)
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/club.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,5 @@ func (c *Club) Namespace() string {
}

func (c *Club) EmbeddingString() string {
return c.Name + " " + c.Name + " " + c.Name + " " + c.Name + " " + c.Description
return fmt.Sprintf("%s %s %s %s %s", c.Name, c.Name, c.Name, c.Name, c.Description)
}
3 changes: 0 additions & 3 deletions backend/src/services/auth.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package services

import (
"fmt"

"github.com/GenerateNU/sac/backend/src/auth"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
Expand Down Expand Up @@ -101,7 +99,6 @@ func (a *AuthService) UpdatePassword(id string, userBody models.UpdatePasswordRe

correct, passwordErr := auth.ComparePasswordAndHash(userBody.OldPassword, passwordHash)
if passwordErr != nil {
fmt.Println("err", passwordErr)
return &errors.FailedToValidateUser
}

Expand Down
4 changes: 4 additions & 0 deletions backend/tests/api/helpers/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ func (app TestApp) Send(request TestRequest) (*http.Response, error) {
Name: "access_token",
Value: app.TestUser.AccessToken,
})
req.AddCookie(&http.Cookie{
Name: "refresh_token",
Value: app.TestUser.RefreshToken,
})
}

resp, err := app.App.Test(req)
Expand Down
10 changes: 5 additions & 5 deletions frontend/sac-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"dependencies": {
"@clerk/clerk-expo": "^0.20.5",
"@expo/vector-icons": "^13.0.0",
"@react-navigation/native": "^6.0.2",
"@tanstack/react-query": "^5.17.9",
"@react-navigation/native": "^6.1.10",
"@tanstack/react-query": "^5.22.2",
"clsx": "^2.1.0",
"eslint-config-prettier": "^9.1.0",
"expo": "~50.0.6",
"expo": "~50.0.7",
"expo-auth-session": "~5.4.0",
"expo-font": "~11.10.2",
"expo-linking": "~6.2.2",
Expand All @@ -40,7 +40,7 @@
"react-native-web": "~0.19.6",
"semver": "7.6.0",
"zod": "^3.22.4",
"zustand": "^4.5.0"
"zustand": "^4.5.1"
},
"devDependencies": {
"@babel/core": "^7.23.9",
Expand All @@ -52,7 +52,7 @@
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.2.1",
"jest-expo": "~50.0.2",
"postcss": "^8.4.33",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"react-test-renderer": "18.2.0",
"tailwindcss": "3.4.1",
Expand Down
Loading

0 comments on commit f018c3a

Please sign in to comment.