forked from Trustie/forgeplus
新增:系统消息接口
This commit is contained in:
parent
894728f620
commit
536e038657
|
|
@ -0,0 +1,8 @@
|
|||
class Api::V1::SystemNotificationsController < Api::V1::BaseController
|
||||
|
||||
def index
|
||||
@system_notifications = SystemNotification.where(is_top: true)
|
||||
@system_notifications = kaminary_select_paginate(@system_notifications)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
json.total_count @system_notifications.total_count
|
||||
json.system_notifications @system_notifications.each do |notification|
|
||||
json.(notification, :id, :subject, :sub_subject, :content, :is_top)
|
||||
end
|
||||
|
|
@ -266,6 +266,7 @@ defaults format: :json do
|
|||
|
||||
end
|
||||
|
||||
resources :system_notifications, only: [:index]
|
||||
resources :projects, only: [:index]
|
||||
resources :project_topics, only: [:index, :create, :destroy]
|
||||
resources :project_datasets, only: [:index]
|
||||
|
|
|
|||
Loading…
Reference in New Issue