Skip to content

Introducing a Route to access the POST codes - #1603

Merged
david-yz-liu merged 3 commits into
Courseography:masterfrom
matt-dahlgren:programs-request
Sep 14, 2025
Merged

Introducing a Route to access the POST codes#1603
david-yz-liu merged 3 commits into
Courseography:masterfrom
matt-dahlgren:programs-request

Conversation

@matt-dahlgren

@matt-dahlgren matt-dahlgren commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Proposed Changes

Added the module Program.hs in app/Controllers/ to query the database to get a full list of POST codes in the database.
Added tests to simulate calls to an empty and populated (single entry and multiple entries) database.

...

Details

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality) X
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the CircleCI checks have passed.
  • I have requested a review from a project maintainer.

Questions and Comments

(Include any questions or comments you have regarding your changes.)

@coveralls

coveralls commented Sep 12, 2025

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 43f2157c-600e-448a-8180-35c69b493c08

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 54.687%

Totals Coverage Status
Change from base Build bfec1df0-12cd-4adb-a40a-5f0514531d1c: 0.06%
Covered Lines: 2187
Relevant Lines: 3934

💛 - Coveralls

@david-yz-liu david-yz-liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matt-dahlgren nice work, I just left a few minor comments

Comment thread CHANGELOG.md Outdated
- Added test cases for the `ExportModal` component in `js/components/common`
- Updated backend tests to use `tasty-discover`
- Added documentation for running a subset of the backend tests
- Added a route to access all POST codes stored in the database with test coverage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an enhancement

import Test.Tasty.HUnit (assertEqual, testCase)
import TestHelpers (clearDatabase, runServerPart, withDatabase)

-- | List of test cases as (label, input courses, expected output)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the comments in this file need to be updated (they refer to courses, not programs)

@david-yz-liu david-yz-liu mentioned this pull request Sep 13, 2025
4 tasks
@david-yz-liu
david-yz-liu merged commit 8046ede into Courseography:master Sep 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants