Merge branch 'api' of http://repository.trustie.net/xianbo/trustie2 into api
This commit is contained in:
commit
93c7deebc4
|
@ -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
|
||||
|
||||
|
||||
|
|
14
db/schema.rb
14
db/schema.rb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue