fix(issue-12): ydb course repository migrate to new v3
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,14 @@ func NewApplication(ctx context.Context, cfg ApplicationConfig, mapper domain.Co
|
||||
organizationrepo = sqliteConnection.Organization()
|
||||
repoCloser = sqliteConnection
|
||||
case RepositoryEngineYDB:
|
||||
return Application{}, errors.New("ydb is no longer supported")
|
||||
ydbConn, err := adapters.NewYDBConnection(ctx, cfg.YDB, log.With(slog.String("db", "ydb")))
|
||||
if err != nil {
|
||||
return Application{}, fmt.Errorf("making ydb connection: %w", err)
|
||||
}
|
||||
|
||||
courseadapter = ydbConn.CourseRepository()
|
||||
organizationrepo = ydbConn.Organization()
|
||||
repoCloser = ydbConn
|
||||
default:
|
||||
return Application{}, errors.New("unable to decide which db engine to use")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user