MSP-5186 Implement application next id endpoint

This commit is contained in:
Синельник Тимур Романович committed 2025-04-02 09:54:25 +03:00
1 parent 141650417a
commit 89f4eea280
4 files changed
+46

No files matched your search

+8
View File
@@ -256,6 +256,14 @@ func (s Application) EnrichWithTokens(ctx context.Context, apps []entity.Applica
return result, nil
}
func (s Application) NextId(ctx context.Context) (int, error) {
nextId, err := s.appRepo.NextApplicationId(ctx)
if err != nil {
return 0, errors.WithMessage(err, "get next application id")
}
return nextId, nil
}
func (s Application) convertApplication(req entity.Application) domain.Application {
desc := ""
if req.Description != nil {