2024-09-09 03:32:10 +05:00

18 lines
327 B
Go

package widget
import (
"context"
)
type CreatorRepository interface {
Create(ctx context.Context, userId int) (int, error)
}
func (service *Service) Create(ctx context.Context, userId int) (int, error) {
widgetId, err := service.repository.Create(ctx, userId)
if err != nil {
return 0, err
}
return widgetId, nil
}