add repositories and fixed services

This commit is contained in:
Fran Jurmanović
2022-10-07 23:48:35 +02:00
parent 82e97fc97f
commit ec863d55b3
36 changed files with 703 additions and 497 deletions

View File

@@ -12,7 +12,7 @@ type ApiService struct {
func NewApiService(repository *repository.ApiRepository) *ApiService {
return &ApiService{
repository,
repository: repository,
}
}
@@ -42,6 +42,6 @@ Starts database migration.
*model.MessageResponse: Message response object.
*model.Exception: Exception response object.
*/
func (as ApiService) PostMigrate(ctx context.Context, version string) (*model.MessageResponse, *model.Exception) {
func (as ApiService) PostMigrate(ctx context.Context, version string) []error {
return as.repository.PostMigrate(ctx, version)
}