Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 2.2ms | Elasticsearch: 0.0ms)
Started GET "/api/notifications/polling?last_poll=2020-03-11T09:45:19.695Z" for 78.208.95.64 at 2020-03-11 09:45:49 +0000
Processing by API::NotificationsController#polling as JSON
Parameters: {"last_poll"=>"2020-03-11T09:45:19.695Z"}
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
(0.2ms) SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 [["receiver_id", 1], ["receiver_type", "User"]]
(0.1ms) SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND "notifications"."is_read" = $3 [["receiver_id", 1], ["receiver_type", "User"], ["is_read", "f"]]
Notification Load (0.2ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND (is_read = false AND created_at >= '2020-03-11T09:45:19.695Z') ORDER BY created_at DESC [["receiver_id", 1], ["receiver_type", "User"]]
Rendered api/notifications/index.json.jbuilder (0.9ms)
Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.9ms | Elasticsearch: 0.0ms)
Started GET "/api/members/search/ca" for 78.208.95.64 at 2020-03-11 09:46:01 +0000
Processing by API::MembersController#search as JSON
Parameters: {"query"=>"ca"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Role Load (0.3ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'member') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
SQL (5.9ms) SELECT "users"."id" AS t0_r0, "users"."email" AS t0_r1, "users"."encrypted_password" AS t0_r2, "users"."reset_password_token" AS t0_r3, "users"."reset_password_sent_at" AS t0_r4, "users"."remember_created_at" AS t0_r5, "users"."sign_in_count" AS t0_r6, "users"."current_sign_in_at" AS t0_r7, "users"."last_sign_in_at" AS t0_r8, "users"."current_sign_in_ip" AS t0_r9, "users"."last_sign_in_ip" AS t0_r10, "users"."confirmation_token" AS t0_r11, "users"."confirmed_at" AS t0_r12, "users"."confirmation_sent_at" AS t0_r13, "users"."unconfirmed_email" AS t0_r14, "users"."failed_attempts" AS t0_r15, "users"."unlock_token" AS t0_r16, "users"."locked_at" AS t0_r17, "users"."created_at" AS t0_r18, "users"."updated_at" AS t0_r19, "users"."is_allow_contact" AS t0_r20, "users"."group_id" AS t0_r21, "users"."stp_customer_id" AS t0_r22, "users"."username" AS t0_r23, "users"."slug" AS t0_r24, "users"."is_active" AS t0_r25, "users"."provider" AS t0_r26, "users"."uid" AS t0_r27, "users"."auth_token" AS t0_r28, "users"."merged_at" AS t0_r29, "users"."is_allow_newsletter" AS t0_r30, "profiles"."id" AS t1_r0, "profiles"."user_id" AS t1_r1, "profiles"."first_name" AS t1_r2, "profiles"."last_name" AS t1_r3, "profiles"."phone" AS t1_r4, "profiles"."interest" AS t1_r5, "profiles"."software_mastered" AS t1_r6, "profiles"."created_at" AS t1_r7, "profiles"."updated_at" AS t1_r8, "profiles"."facebook" AS t1_r9, "profiles"."twitter" AS t1_r10, "profiles"."google_plus" AS t1_r11, "profiles"."viadeo" AS t1_r12, "profiles"."linkedin" AS t1_r13, "profiles"."instagram" AS t1_r14, "profiles"."youtube" AS t1_r15, "profiles"."vimeo" AS t1_r16, "profiles"."dailymotion" AS t1_r17, "profiles"."github" AS t1_r18, "profiles"."echosciences" AS t1_r19, "profiles"."website" AS t1_r20, "profiles"."pinterest" AS t1_r21, "profiles"."lastfm" AS t1_r22, "profiles"."flickr" AS t1_r23, "profiles"."job" AS t1_r24, "profiles"."tours" AS t1_r25 FROM "users" INNER JOIN "profiles" ON "profiles"."user_id" = "users"."id" INNER JOIN "statistic_profiles" ON "statistic_profiles"."user_id" = "users"."id" INNER JOIN "users_roles" ON "users_roles"."user_id" = "users"."id" INNER JOIN "roles" ON "roles"."id" = "users_roles"."role_id" LEFT JOIN "subscriptions" ON "subscriptions"."statistic_profile_id" = "statistic_profiles"."id" AND "subscriptions"."created_at" = ( SELECT max("created_at") FROM "subscriptions" WHERE "statistic_profile_id" = "statistic_profiles"."id") WHERE (users.is_active = 'true' AND roles.name = 'member') AND (lower(f_unaccent(profiles.first_name)) ~ 'ca' OR lower(f_unaccent(profiles.last_name)) ~ 'ca') LIMIT 50
StatisticProfile Load (0.1ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Rendered api/members/search.json.jbuilder (2.0ms)
Completed 200 OK in 15ms (Views: 2.1ms | ActiveRecord: 7.0ms | Elasticsearch: 0.0ms)
Started POST "/api/prices/compute" for 78.208.95.64 at 2020-03-11 09:46:03 +0000
Value for params[:reservation][:slots_attributes] was set to nil, because it was one of [], [null] or [null, null, ...]. Go to http://guides.rubyonrails.org/security.html#unsafe-query-generation for more information.
Processing by API::PricesController#compute as JSON
Parameters: {"reservation"=>{"user_id"=>2, "reservable_id"=>"5", "reservable_type"=>"Machine", "slots_attributes"=>nil}, "price"=>{}}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Machine Load (0.2ms) SELECT "machines".* FROM "machines" WHERE "machines"."id" = $1 LIMIT 1 [["id", 5]]
Role Load (0.2ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
StatisticProfile Load (0.2ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Subscription Load (0.2ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Price Load (0.2ms) SELECT "prices".* FROM "prices" WHERE "prices"."priceable_id" = $1 AND "prices"."priceable_type" = $2 AND "prices"."group_id" = $3 AND "prices"."plan_id" IS NULL LIMIT 1 [["priceable_id", 5], ["priceable_type", "Machine"], ["group_id", 1]]
Rendered api/prices/compute.json.jbuilder (0.1ms)
Completed 200 OK in 12ms (Views: 0.7ms | ActiveRecord: 2.0ms | Elasticsearch: 0.0ms)
Started GET "/api/members/2" for 78.208.95.64 at 2020-03-11 09:46:03 +0000
Processing by API::MembersController#show as JSON
Parameters: {"id"=>"2"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."slug" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["slug", "2"]]
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Role Load (0.1ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
Role Load (0.3ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 ORDER BY "roles"."id" ASC LIMIT 1 [["user_id", 2]]
Profile Load (0.1ms) SELECT "profiles".* FROM "profiles" WHERE "profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
StatisticProfile Load (0.2ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
UserAvatar Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('UserAvatar') AND "assets"."viewable_id" = $1 AND "assets"."viewable_type" = $2 LIMIT 1 [["viewable_id", 2], ["viewable_type", "Profile"]]
InvoicingProfile Load (0.2ms) SELECT "invoicing_profiles".* FROM "invoicing_profiles" WHERE "invoicing_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Address Load (0.2ms) SELECT "addresses".* FROM "addresses" WHERE "addresses"."placeable_id" = $1 AND "addresses"."placeable_type" = $2 LIMIT 1 [["placeable_id", 2], ["placeable_type", "InvoicingProfile"]]
Organization Load (0.2ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."invoicing_profile_id" = $1 LIMIT 1 [["invoicing_profile_id", 2]]
Subscription Load (0.1ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
CACHE (0.0ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Credit Load (0.3ms) SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Training') [["user_id", 2]]
Credit Load (0.2ms) SELECT "credits".* FROM "credits" INNER JOIN "users_credits" ON "credits"."id" = "users_credits"."credit_id" WHERE "users_credits"."user_id" = $1 AND (credits.creditable_type = 'Machine') [["user_id", 2]]
Rendered api/members/_member.json.jbuilder (12.3ms)
(0.3ms) SELECT "trainings".id FROM "trainings" INNER JOIN "statistic_profile_trainings" ON "trainings"."id" = "statistic_profile_trainings"."training_id" WHERE "statistic_profile_trainings"."statistic_profile_id" = $1 [["statistic_profile_id", 2]]
Training Load (0.2ms) SELECT "trainings".* FROM "trainings" INNER JOIN "statistic_profile_trainings" ON "trainings"."id" = "statistic_profile_trainings"."training_id" WHERE "statistic_profile_trainings"."statistic_profile_id" = $1 [["statistic_profile_id", 2]]
Reservation Load (0.5ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Training"]]
Reservation Load (0.2ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Machine"]]
Reservation Load (0.2ms) SELECT "reservations".* FROM "reservations" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 [["statistic_profile_id", 2], ["reservable_type", "Space"]]
Project Load (0.1ms) SELECT "projects".* FROM "projects" WHERE "projects"."author_statistic_profile_id" = $1 [["author_statistic_profile_id", 2]]
Project Load (0.3ms) SELECT "projects".* FROM "projects" INNER JOIN "project_users" ON "projects"."id" = "project_users"."project_id" WHERE "project_users"."user_id" = $1 [["user_id", 2]]
Reservation Load (0.5ms) SELECT "reservations".* FROM "reservations" INNER JOIN "slots_reservations" ON "slots_reservations"."reservation_id" = "reservations"."id" INNER JOIN "slots" ON "slots"."id" = "slots_reservations"."slot_id" WHERE "reservations"."statistic_profile_id" = $1 AND "reservations"."reservable_type" = $2 ORDER BY slots.start_at asc [["statistic_profile_id", 2], ["reservable_type", "Event"]]
Invoice Load (0.3ms) SELECT "invoices".* FROM "invoices" WHERE "invoices"."invoicing_profile_id" = $1 ORDER BY reference DESC [["invoicing_profile_id", 2]]
(0.3ms) SELECT "tags".id FROM "tags" INNER JOIN "user_tags" ON "tags"."id" = "user_tags"."tag_id" WHERE "user_tags"."user_id" = $1 [["user_id", 2]]
Tag Load (0.2ms) SELECT "tags".* FROM "tags" INNER JOIN "user_tags" ON "tags"."id" = "user_tags"."tag_id" WHERE "user_tags"."user_id" = $1 [["user_id", 2]]
Rendered api/members/show.json.jbuilder (30.9ms)
Completed 200 OK in 37ms (Views: 23.9ms | ActiveRecord: 8.4ms | Elasticsearch: 0.0ms)
Started POST "/api/prices/compute" for 78.208.95.64 at 2020-03-11 09:46:03 +0000
Value for params[:reservation][:slots_attributes] was set to nil, because it was one of [], [null] or [null, null, ...]. Go to http://guides.rubyonrails.org/security.html#unsafe-query-generation for more information.
Processing by API::PricesController#compute as JSON
Parameters: {"reservation"=>{"user_id"=>2, "reservable_id"=>"5", "reservable_type"=>"Machine", "slots_attributes"=>nil}, "price"=>{}}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
Machine Load (0.2ms) SELECT "machines".* FROM "machines" WHERE "machines"."id" = $1 LIMIT 1 [["id", 5]]
Role Load (0.2ms) SELECT "roles".* FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = $1 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [["user_id", 1]]
StatisticProfile Load (0.2ms) SELECT "statistic_profiles".* FROM "statistic_profiles" WHERE "statistic_profiles"."user_id" = $1 LIMIT 1 [["user_id", 2]]
Subscription Load (0.2ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."statistic_profile_id" = $1 ORDER BY "subscriptions"."created_at" DESC LIMIT 1 [["statistic_profile_id", 2]]
Price Load (0.2ms) SELECT "prices".* FROM "prices" WHERE "prices"."priceable_id" = $1 AND "prices"."priceable_type" = $2 AND "prices"."group_id" = $3 AND "prices"."plan_id" IS NULL LIMIT 1 [["priceable_id", 5], ["priceable_type", "Machine"], ["group_id", 1]]
Rendered api/prices/compute.json.jbuilder (0.1ms)
Completed 200 OK in 11ms (Views: 0.8ms | ActiveRecord: 1.6ms | Elasticsearch: 0.0ms)
Started GET "/api/notifications/polling?last_poll=2020-03-11T09:45:49.618Z" for 78.208.95.64 at 2020-03-11 09:46:19 +0000
Processing by API::NotificationsController#polling as JSON
Parameters: {"last_poll"=>"2020-03-11T09:45:49.618Z"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
(0.2ms) SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 [["receiver_id", 1], ["receiver_type", "User"]]
(0.1ms) SELECT COUNT(*) FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND "notifications"."is_read" = $3 [["receiver_id", 1], ["receiver_type", "User"], ["is_read", "f"]]
Notification Load (0.2ms) SELECT "notifications".* FROM "notifications" WHERE "notifications"."receiver_id" = $1 AND "notifications"."receiver_type" = $2 AND (is_read = false AND created_at >= '2020-03-11T09:45:49.618Z') ORDER BY created_at DESC [["receiver_id", 1], ["receiver_type", "User"]]
Rendered api/notifications/index.json.jbuilder (1.0ms)
Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.7ms | Elasticsearch: 0.0ms)