|
|
@ -11,10 +11,8 @@ module Mobile
|
|
|
|
params do
|
|
|
|
params do
|
|
|
|
requires :type, type: String
|
|
|
|
requires :type, type: String
|
|
|
|
requires :content, type: String
|
|
|
|
requires :content, type: String
|
|
|
|
requires :token, type: String
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
post ':id' do
|
|
|
|
post ':id' do
|
|
|
|
# authenticate!
|
|
|
|
|
|
|
|
unless current_user
|
|
|
|
unless current_user
|
|
|
|
#如果当前用户不存在 则需要根据微信昵称注册一个帐号
|
|
|
|
#如果当前用户不存在 则需要根据微信昵称注册一个帐号
|
|
|
|
openid = session[:wechat_openid]
|
|
|
|
openid = session[:wechat_openid]
|
|
|
@ -38,6 +36,8 @@ module Mobile
|
|
|
|
)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
authenticate!
|
|
|
|
|
|
|
|
|
|
|
|
status = 0
|
|
|
|
status = 0
|
|
|
|
tip = 0 #0班级1项目
|
|
|
|
tip = 0 #0班级1项目
|
|
|
|
type = params[:type]
|
|
|
|
type = params[:type]
|
|
|
|