修改错误

This commit is contained in:
z9hang 2015-01-05 10:15:14 +08:00
parent d1846e6303
commit b5da95d5ce
4 changed files with 1348 additions and 1343 deletions

View File

@ -31,7 +31,9 @@ module Mobile
mount Apis::Watches mount Apis::Watches
mount Apis::Upgrade mount Apis::Upgrade
add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'}) #add_swagger_documentation ({api_version: 'v1', base_path: 'http://u06.shellinfo.cn/trustie/api'})
add_swagger_documentation ({api_version: 'v1', base_path: '/api'})
end end
end end

View File

@ -37,7 +37,7 @@ module Mobile
requires :is_public, type: Integer, desc: '是否公开 1公开 0私有' requires :is_public, type: Integer, desc: '是否公开 1公开 0私有'
requires :open_student, type: Integer, desc: '是否公开学生列表1公开0不公开不公开时非课程成员无法看到学生列表' requires :open_student, type: Integer, desc: '是否公开学生列表1公开0不公开不公开时非课程成员无法看到学生列表'
requires :course_type, type:Integer, desc: '暂时传1' requires :course_type, type:Integer, desc: '暂时传1'
requires :term, type: String, desc: '学期(秋秀学期或春秀学期)' requires :term, type: String, desc: '学期(秋季学期或春季学期)'
requires :time, type: String, desc: '年份' requires :time, type: String, desc: '年份'
requires :class_period, type: String, desc: '学时总数' requires :class_period, type: String, desc: '学时总数'
end end

View File

@ -126,7 +126,7 @@ class CoursesService
if current_user.user_extensions.identity if current_user.user_extensions.identity
@course = Course.new @course = Course.new
@course.extra = 'course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s @course.extra = 'course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s
@course.safe_attributes = params[:course] @course.safe_attributes = params[:course],current_user
@course.tea_id = User.current.id @course.tea_id = User.current.id
@course.term = params[:term] @course.term = params[:term]
@course.time = params[:time] @course.time = params[:time]

File diff suppressed because it is too large Load Diff