debian-mirror-gitlab/app/services/snippets/base_service.rb

16 lines
335 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
# 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