This commit is contained in:
= 2014-12-18 14:51:37 +08:00
commit 93c7deebc4
2 changed files with 1343 additions and 1330 deletions

View File

@ -25,8 +25,9 @@ module Mobile
post do
authenticate!
ws = WatchesService.new
o = ws.watch(params.merge({current_user_id:current_user.id, object_type:'user' }) )
{status:0, data: o}
o = ws.watch(params.merge({current_user_id:current_user.id, object_type:'user' }) )
present :data, o, with: Mobile::Entities::User
present :status, 0
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141201085218) do
ActiveRecord::Schema.define(:version => 20141210070327) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -23,6 +23,18 @@ ActiveRecord::Schema.define(:version => 20141201085218) do
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
create_table "api_keys", :force => true do |t|
t.string "access_token"
t.datetime "expires_at"
t.integer "user_id"
t.boolean "active", :default => true
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
create_table "applied_projects", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false