You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
class EduApisController < ApplicationController
before_action :check_validate
skip_before_action :user_setup
skip_before_action :setup_laboratory
# trustie获取数据
def edu_data_info
# 每天晚上00: 00: 00分获取前一天的数据
begin_time = ( Time . now - 1 . day ) . beginning_of_day
end_time = ( Time . now - 1 . day ) . at_end_of_day
@user_count = User . where ( created_on : begin_time .. end_time ) . count
@project_count = Project . where ( created_on : begin_time .. end_time ) . count
@shixun_count = Shixun . where ( created_at : begin_time .. end_time ) . count
@school_count = School . where ( created_at : begin_time .. end_time ) . count
end
private
def check_validate
logger . info ( " # # # # # # # # " )
render_unauthorized ( " 401 Unauthorized " ) if params [ :private_token ] != " hriEn3UwXfJs3PmyXnSG "
end
end