Commit Graph

4 Commits

Author SHA1 Message Date
Teriuihi 4ec41d8a7e Mark fields as final in VerificationData and ContactFormData
The 'code', 'eMail' fields in the VerificationData class and 'username', 'email', 'question' fields in the ContactFormData class are now marked as 'final'. At the same time, some unused imports from ContactController, ContactFormData, FormQuery, and VerifyController have been removed for code cleanliness.
2024-01-14 11:20:08 +01:00
Teriuihi 917965a33d Add TestForm class and set up related unit tests
The changes add a new TestForm class to implement unit tests for form handling in the application. The included tests verify the storing, retrieving, and verification of forms from a database, as well as form object creation and confirmation of form data. This is a step towards improving the code's reliability and making it easier to catch potential bugs or issues.
2024-01-14 11:09:35 +01:00
Teriuihi 0464281a38 Refactor code to use Form objects instead of JSON strings
Several parts of the code have been altered to use Form objects instead of JSON strings. Changes include updating the FormQueryResult record type to hold an Optional<Form> instead of an Optional<String>, altering methods in the StoreFormQuery class to insert Form data into the database and replacing JSON handling methods in the FormQuery class with Form object oriented methods. A 'form_class' field has also been added to the 'form' table in the database to aid form identification and reconstruction from stored data.
2024-01-14 11:09:22 +01:00
Teriuihi 2b908b4e94 Initial commit for site for forms 2024-01-13 16:24:54 +01:00