fix create outlet
This commit is contained in:
@@ -64,7 +64,7 @@ func (p *OutletProcessorImpl) GetOutletByID(ctx context.Context, organizationID,
|
||||
func (p *OutletProcessorImpl) CreateOutlet(ctx context.Context, req *models.CreateOutletRequest) (*models.OutletResponse, error) {
|
||||
// Get organization ID from context
|
||||
contextInfo := appcontext.FromContext(ctx)
|
||||
if contextInfo.OrganizationID == uuid.Nil {
|
||||
if contextInfo == nil || contextInfo.OrganizationID == uuid.Nil {
|
||||
return nil, fmt.Errorf("organization ID not found in context")
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ func (p *OutletProcessorImpl) UpdateOutlet(ctx context.Context, outletID uuid.UU
|
||||
|
||||
func (p *OutletProcessorImpl) DeleteOutlet(ctx context.Context, outletID uuid.UUID) error {
|
||||
contextInfo := appcontext.FromContext(ctx)
|
||||
if contextInfo.OrganizationID == uuid.Nil {
|
||||
if contextInfo == nil || contextInfo.OrganizationID == uuid.Nil {
|
||||
return fmt.Errorf("organization ID not found in context")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user