-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
The current paths are nested in an companion object
within every controller.
For example in the HelpProviderController
we have the following structure
companion object {
const val PATH_HELP_PROVIDERS = "help-providers"
const val PATH_HELP_REQUESTERS = "help-requesters"
const val PATH_ACCEPT_EMERGENCY = "accept-emergency"
}
To avoid duplications across all controllers we want to gather them into a single file.
Implementation Notes
The file should be placed in the package org.oso.config
.
The resulting structure should have this form
object Paths {
object Emergency {
const val ROOT = "emergency"
const val EMIT = "emit"
const val ACCEPT = "accept"
}
...
}
And then could be used like this
@Controller
@RequestMapping(Paths.Emergency.ROOT)
class EmergencyController
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers