Commit fb7bc8fc authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko

Add StatusSerializer

parent 39ca68e5
...@@ -23,7 +23,7 @@ class FriendsController < ApplicationController ...@@ -23,7 +23,7 @@ class FriendsController < ApplicationController
end end
def status def status
render json: Sidekiq::Status::get_all(job_id) render json: Sidekiq::Status::get_all(job_id), serializer: StatusSerializer
end end
def follow_all def follow_all
......
# frozen_string_literal: true
class StatusSerializer < ActiveModel::Serializer
attributes :at, :status, :total
def at
object['at'].to_i
end
def status
object['status']
end
def total
object['total'].to_i
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment