debian-mirror-gitlab/app/services/snippets/base_service.rb
2020-03-09 13:42:32 +05:30

15 lines
335 B
Ruby

# frozen_string_literal: true
module Snippets
class BaseService < ::BaseService
private
def snippet_error_response(snippet, http_status)
ServiceResponse.error(
message: snippet.errors.full_messages.to_sentence,
http_status: http_status,
payload: { snippet: snippet }
)
end
end
end