mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-24 00:54:02 -05:00
Fix wrong route helper in encrypted messages controller (#13952)
And add `created_at` to encrypted message serializer
This commit is contained in:
parent
77619b1654
commit
f669b8bcce
@ -34,11 +34,11 @@ class Api::V1::Crypto::EncryptedMessagesController < Api::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def next_path
|
def next_path
|
||||||
api_v1_encrypted_messages_url pagination_params(max_id: pagination_max_id) if records_continue?
|
api_v1_crypto_encrypted_messages_url pagination_params(max_id: pagination_max_id) if records_continue?
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev_path
|
def prev_path
|
||||||
api_v1_encrypted_messages_url pagination_params(min_id: pagination_since_id) unless @encrypted_messages.empty?
|
api_v1_crypto_encrypted_messages_url pagination_params(min_id: pagination_since_id) unless @encrypted_messages.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def pagination_max_id
|
def pagination_max_id
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
class REST::EncryptedMessageSerializer < ActiveModel::Serializer
|
class REST::EncryptedMessageSerializer < ActiveModel::Serializer
|
||||||
attributes :id, :account_id, :device_id,
|
attributes :id, :account_id, :device_id,
|
||||||
:type, :body, :digest, :message_franking
|
:type, :body, :digest, :message_franking,
|
||||||
|
:created_at
|
||||||
|
|
||||||
def id
|
def id
|
||||||
object.id.to_s
|
object.id.to_s
|
||||||
|
Loading…
Reference in New Issue
Block a user