|
|
@ -11,11 +11,12 @@ module Mobile
|
|
|
|
params do
|
|
|
|
params do
|
|
|
|
requires :type, type: String
|
|
|
|
requires :type, type: String
|
|
|
|
requires :content, type: String
|
|
|
|
requires :content, type: String
|
|
|
|
|
|
|
|
requires :openid, type: String
|
|
|
|
end
|
|
|
|
end
|
|
|
|
post ':id' do
|
|
|
|
post ':id' do
|
|
|
|
type = params[:type]
|
|
|
|
type = params[:type]
|
|
|
|
result = 1
|
|
|
|
result = 1
|
|
|
|
current_user = User.find 8686
|
|
|
|
current_user = UserWechat.find_by_openid(params[:openid]).user
|
|
|
|
if params[:content]!="" && current_user
|
|
|
|
if params[:content]!="" && current_user
|
|
|
|
case type
|
|
|
|
case type
|
|
|
|
when "HomeworkCommon"
|
|
|
|
when "HomeworkCommon"
|
|
|
|