Skip to content

Commit

Permalink
Merge branch 'main' into delete-user-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye authored Mar 14, 2024
2 parents 1ccbb56 + ef3de06 commit 2c19808
Show file tree
Hide file tree
Showing 76 changed files with 1,264 additions and 706 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backend_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
languages: go
queries: security-and-quality
- name: Build
run: |
cd ./backend/ && go build -o backend src/main.go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
category: backend
4 changes: 2 additions & 2 deletions .github/workflows/cli_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
languages: go
queries: security-and-quality
- name: Build
run: |
cd ./cli/ && go build -o cli main.go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
category: cli
113 changes: 60 additions & 53 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,63 @@ on:
- .github/workflows/mobile.yml

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock

- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Lint
run: |
cd frontend/sac-mobile
yarn lint
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock

- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Test
run: |
cd frontend/sac-mobile
yarn test
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock
- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Format
run: |
cd frontend/sac-mobile
yarn format
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock
- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Lint
run: |
cd frontend/sac-mobile
yarn lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: frontend/sac-mobile/yarn.lock
- name: Install dependencies
run: |
cd frontend/sac-mobile
yarn install
- name: Test
run: |
cd frontend/sac-mobile
yarn test
4 changes: 2 additions & 2 deletions .github/workflows/mobile_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "javascript-typescript"
languages: javascript-typescript
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
category: mobile
4 changes: 2 additions & 2 deletions .github/workflows/web_codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "javascript-typescript"
languages: javascript-typescript
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
category: web
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@

<br />

<a href="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml">
<img src="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml/badge.svg"
alt="Mobile Workflow Status" />
</a>

<a href="https://github.com/GenerateNU/sac/actions/workflows/mobile_codeql.yml">
<img src="https://github.com/GenerateNU/sac/actions/workflows/mobile_codeql.yml/badge.svg"
alt="Mobile CodeQL Workflow Status" />
</a>

<a href="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml">
<img src="https://github.com/GenerateNU/sac/actions/workflows/mobile.yml/badge.svg"
alt="Mobile Workflow Status" />
</a>

<br />

Expand All @@ -61,6 +62,6 @@

<div align="center">
<a href="https://github.com/GenerateNU/sac/graphs/contributors">
<img src="https://contrib.rocks/image?repo=GenerateNU/sac" height="50px"/>
<img src="https://contrib.rocks/image?repo=GenerateNU/sac" height="50px" alt="Contributors Image" />
</a>
</div>
8 changes: 4 additions & 4 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GenerateNU/sac/backend
go 1.22.0

require (
github.com/garrettladley/mattress v0.3.2
github.com/garrettladley/mattress v0.4.0
github.com/go-playground/validator/v10 v10.19.0
github.com/goccy/go-json v0.10.2
github.com/gofiber/fiber/v2 v2.52.2
Expand All @@ -16,9 +16,9 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/spf13/viper v1.18.2
github.com/swaggo/swag v1.16.3
golang.org/x/crypto v0.20.0
golang.org/x/crypto v0.21.0
golang.org/x/text v0.14.0
gorm.io/driver/postgres v1.5.6
gorm.io/driver/postgres v1.5.7
gorm.io/gorm v1.25.7
)

Expand Down Expand Up @@ -75,7 +75,7 @@ require (
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
16 changes: 8 additions & 8 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,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.3.2 h1:JsWsEwjXzlJXX7F/Zzmq7Xby1VAwzTJGGvf7DXPj4Jk=
github.com/garrettladley/mattress v0.3.2/go.mod h1:OWKIRc9wC3gtD3Ng/nUuNEiR1TJvRYLmn/KZYw9nl5Q=
github.com/garrettladley/mattress v0.4.0 h1:ZB3iqyc5q6bqIryNfsh2FMcbMdnV1XEryvqivouceQE=
github.com/garrettladley/mattress v0.4.0/go.mod h1:OWKIRc9wC3gtD3Ng/nUuNEiR1TJvRYLmn/KZYw9nl5Q=
github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=
github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs=
github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU=
Expand Down Expand Up @@ -148,8 +148,8 @@ go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand All @@ -175,8 +175,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
Expand All @@ -201,7 +201,7 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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.6 h1:ydr9xEd5YAM0vxVDY0X139dyzNz10spDiDlC7+ibLeU=
gorm.io/driver/postgres v1.5.6/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM=
gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A=
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
1 change: 1 addition & 0 deletions backend/src/controllers/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewCategoryController(categoryService services.CategoryServiceInterface) *C
// @Failure 400 {string} errors.Error
// @Failure 401 {string} errors.Error
// @Failure 404 {string} errors.Error
// @Failure 409 {string} errors.Error
// @Failure 500 {string} errors.Error
// @Router /categories/ [post]
func (cat *CategoryController) CreateCategory(c *fiber.Ctx) error {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/controllers/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (e *EventController) CreateEvent(c *fiber.Ctx) error {
return c.Status(fiber.StatusCreated).JSON(event)
}

// CreateSeries godoc
// UpdateEvent godoc
//
// @Summary Create a series
// @Description Creates a series
Expand All @@ -148,7 +148,7 @@ func (e *EventController) CreateEvent(c *fiber.Ctx) error {
// @Accept json
// @Produce json
// @Param eventID path string true "Event ID"
// @Param seriesBody body models.CreateSeriesRequestBody true "Series Body"
// @Param seriesBody body models.UpdateEventRequestBody true "Series Body"
// @Success 201 {object} models.Series
// @Failure 400 {object} errors.Error
// @Failure 401 {object} errors.Error
Expand Down
1 change: 1 addition & 0 deletions backend/src/controllers/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewUserController(userService services.UserServiceInterface) *UserControlle
// @Failure 400 {object} errors.Error
// @Failure 401 {object} errors.Error
// @Failure 404 {object} errors.Error
// @Failure 409 {object} errors.Error
// @Failure 500 {object} errors.Error
// @Router /users/ [post]
func (u *UserController) CreateUser(c *fiber.Ctx) error {
Expand Down
3 changes: 2 additions & 1 deletion backend/src/controllers/user_follower.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package controllers

import (
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/gofiber/fiber/v2"
)

Expand Down Expand Up @@ -33,7 +34,7 @@ func (uf *UserFollowerController) CreateFollowing(c *fiber.Ctx) error {
if err != nil {
return err.FiberError(c)
}
return c.SendStatus(fiber.StatusCreated)
return utilities.FiberMessage(c, fiber.StatusCreated, "Successfully followed club")
}

// DeleteFollowing godoc
Expand Down
3 changes: 2 additions & 1 deletion backend/src/controllers/user_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package controllers

import (
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/gofiber/fiber/v2"
)

Expand Down Expand Up @@ -34,7 +35,7 @@ func (um *UserMemberController) CreateMembership(c *fiber.Ctx) error {
return err.FiberError(c)
}

return c.SendStatus(fiber.StatusCreated)
return utilities.FiberMessage(c, fiber.StatusCreated, "Successfully joined club")
}

// DeleteMembership godoc
Expand Down
Loading

0 comments on commit 2c19808

Please sign in to comment.