Skip to content

Feature - GET /questionnaires#2

Open
CyberAve2100 wants to merge 1 commit into
developmentfrom
feature/get-questionnaires
Open

Feature - GET /questionnaires#2
CyberAve2100 wants to merge 1 commit into
developmentfrom
feature/get-questionnaires

Conversation

@CyberAve2100

Copy link
Copy Markdown
Contributor

Not fully tested yet but putting it up for feedback already, it runs for me locally but cant test atm because the local db isnt configured yet

@CyberAve2100 CyberAve2100 linked an issue Dec 21, 2024 that may be closed by this pull request
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@SemPlaatsman SemPlaatsman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Basically Daan had laatst nog wat nieuwe db connection code geschreven. Als je dat overneemt hoef je verder geen mapping of omweg te verzinnen voor het laten werken in openshift, dan kan je het gelijk hosten, wat super chill is.

Comment thread .env.example
Comment on lines +12 to +14
POSTGRESQL_DB_URL=
POSTGRESQL_DB_USERNAME=
POSTGRESQL_DB_PASSWORD= No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Check de nieuwste code van Daan, heeft nu namelijk andere env variables. Die heeft er nu namelijk 6 ofzo en die structuur moet je overnemen als je wilt dat je db werkt in openshift. Kijk ook naar zijn application.properties

Comment on lines 46 to +48
# Database Configuration
azure.storage.connection-string=${AZURE_STORAGE_CONNECTION_STRING:UseDevelopmentStorage=true}
azure.storage.table-name=${AZURE_STORAGE_TABLE_NAME:products}
azure.storage.table-name=${AZURE_STORAGE_TABLE_NAME:products} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hier ook nog even naar kijken en kopiëren wat Daan heeft

Comment thread pom.xml
Comment on lines +245 to +246
<trimTrailingWhitespace />
<endWithNewline />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove extra space here

val title: String,
val description: String,
val estimatedTimeOfCompletion: String,
val assignedAt: String,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why is assigned at a string? Should be date time no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In the swagger it is annotated this way so the response should give back a string right?

@SemPlaatsman SemPlaatsman Dec 24, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One question, assignedAt is not confused with assignedTo right? Cause does the assignedAt field mean the date at which the questionnaire was assigned, or who it was assigned to? Because if it's the date at which the questionnaire was assigned, datetime is more logical, but if it's confused with who it was assigned to, then it should be string (and maybe a more clear name, e.g. assignedUserId or something).

PS: Something seems off in Swagger, always double check.

Comment on lines +4 to +8
var id: String = ""
var title: String = ""
var description: String = ""
var estimatedTimeOfCompletion: String = ""
var assignedAt: String = ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

these default values are redundant, as it automatically becomes an empty string

Comment thread src/main/kotlin/org/ptss/support/domain/models/Questionnaire.kt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

do you still need this?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why do you need this to be vars btw? can't you just make this a data class?

data class Questionnaire(
    val id: String,
    val title: String,
    val description: String,
    val estimatedTimeOfCompletion: String,
    val assignedAt: String,
    val isFinished: Boolean
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

true, changed it

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.

GET /questionnaires

4 participants