Skip to content

Commit

Permalink
feat: delete schedules on account
Browse files Browse the repository at this point in the history
* feat: delete schedules on account

* feat: testing tests
  • Loading branch information
qamarq authored Dec 7, 2024
1 parent 55c040f commit 72c160e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: CI
on:
push:
branches: ["main"]
paths:
- "frontend/**"
pull_request:
branches: ["main"]
paths:
- "frontend/**"

jobs:
lint:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/ci_backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Backend

on:
push:
branches: ["main"]
paths:
- "backend/**"
pull_request:
branches: ["main"]
paths:
- "backend/**"

jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm

- name: Install deps
run: npm ci

- name: Lint
run: npm run lint
if: always()

- name: Type check
run: npm run typecheck
if: always()

- name: Run Test Build
run: npm run build
env:
NODE_ENV: production
PORT: 3333
HOST: 0.0.0.0
LOG_LEVEL: debug
APP_KEY: really-hard-secret-key-to-guess
SESSION_DRIVER: cookie
DB_HOST: localhost
DB_PORT: 5432
DB_USER: postgres
DB_DATABASE: postgres
DB_PASSWORD: postgres
USOS_CONSUMER_KEY: test
USOS_CONSUMER_SECRET: test
if: always()
1 change: 0 additions & 1 deletion backend/app/controllers/departments_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default class DepartmentsController {
*/
async show({ params }: HttpContext) {
return await Department.findOrFail(params.id)

}

/**
Expand Down
3 changes: 3 additions & 0 deletions backend/start/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ router.post('/user/schedules', [SchedulesController, 'store']).use(middleware.us
router
.patch('/user/schedules/:schedule_id', [SchedulesController, 'update'])
.use(middleware.usosAuth())
router
.delete('/user/schedules/:schedule_id', [SchedulesController, 'destroy'])
.use(middleware.usosAuth())

router.post('user/login', [AuthController, 'store']).use(middleware.guest())
router.delete('user/logout', [AuthController, 'destroy']).use(middleware.usosAuth())

0 comments on commit 72c160e

Please sign in to comment.