prathmeshranaut / skooterapi

Ruby API implementation for SkooterApp
4 stars 1 forks source link

skooterapi: I can not bypass the opening screen. That's what happens with skooterapi. Why can not I open the opening screen pass. #6

Closed byzatwuer closed 7 years ago

byzatwuer commented 7 years ago

hello @prathmeshranaut

I can not bypass the opening screen. That's what happens with skooterapi. Why can not I open the opening screen pass.

I will go nuts please help me @prathmeshranaut please.

Started POST "/api/v1/user" for 176.54.70.157 at 2017-04-08 11:27:42 -0400
Cannot render console from 176.54.70.157! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by UserController#create_user as HTML
  Parameters: {"phone"=>"1234456677654", "android_version"=>"22", "device_info"=>"htc HTC Desire 830", "version"=>"v1", "user"=>{}}
Can't verify CSRF token authenticity
Unpermitted parameters: phone, android_version, device_info, version, user
  User Load (0.2ms)  SELECT  "users".* FROM "users" LIMIT 1
   (0.0ms)  BEGIN
   (0.1ms)  ROLLBACK
   (0.0ms)  BEGIN
   (0.0ms)  ROLLBACK
Completed 501 Not Implemented in 3ms (Views: 0.1ms | ActiveRecord: 0.4ms)
byzatwuer commented 7 years ago

config aplications.rb I added this code @prathmeshranaut

###      require 'socket'
require 'ipaddr'
  config.web_console.whitelisted_ips = Socket.ip_address_list.reduce([]) do |res, addrinfo|
    addrinfo.ipv4? ? res << IPAddr.new(addrinfo.ip_address).mask(24) : res
end

error It changed in this way

### Started POST "/api/v1/user" for 176.55.165.228 at 2017-04-08 11:56:19 -0400
  ActiveRecord::SchemaMigration Load (0.2ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by UserController#create_user as HTML
  Parameters: {"phone"=>"2bfcc3088526737b", "android_version"=>"22", "device_info"=>"htc HTC Desire 830", "version"=>"v1", "user"=>{}}
Can't verify CSRF token authenticity
Unpermitted parameters: phone, android_version, device_info, version, user
  User Load (0.3ms)  SELECT  "users".* FROM "users" LIMIT 1
   (0.1ms)  BEGIN
   (0.1ms)  ROLLBACK
   (0.0ms)  BEGIN
   (0.1ms)  ROLLBACK
Completed 501 Not Imp
prathmeshranaut commented 7 years ago

Can't verify CSRF token authenticity This is the issue.

Check this out : http://stackoverflow.com/questions/27393694/ruby-on-rails-json-rest-api-csrf-token

byzatwuer commented 7 years ago

I did not understand. What am I going to do now I am new to ruby @prathmeshranaut

byzatwuer commented 7 years ago

please help me. @prathmeshranaut

prathmeshranaut commented 7 years ago

Add this line skip_before_filter :verify_authenticity_token here https://github.com/prathmeshranaut/skooterapi/blob/master/app/controllers/user_controller.rb#L5

byzatwuer commented 7 years ago
Started POST "/api/v1/user" for 176.54.87.35 at 2017-04-09 02:40:54 -0400
Processing by UserController#create_user as HTML
  Parameters: {"phone"=>"2bfcc3088526737b", "android_version"=>"22", "device_info"=>"htc HTC Desire 830", "user"=>{}}
Unpermitted parameters: phone, android_version, device_info, user
  User Load (0.2ms)  SELECT  "users".* FROM "users" LIMIT 1
   (0.0ms)  BEGIN
   (0.0ms)  ROLLBACK
   (0.0ms)  BEGIN
   (0.0ms)  ROLLBACK
Completed 501 Not Implemented in 3ms (Views: 0.1ms | ActiveRecord: 0.3ms)

@prathmeshranaut I cannot cross the login screen again.

byzatwuer commented 7 years ago

Could you check my server. @prathmeshranaut

Login information 5.39.5.63 login username: root password: Siber999

postgresql password: edirnekesan1996

prathmeshranaut commented 7 years ago

Could you tell me where have you stored this API and how do you turn on the rails server?

On Apr 9, 2017, at 12:16 PM, byzatwuer notifications@github.com wrote:

Could you check my server.

Login information 5.39.5.63 login username: root password: Siber999

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

byzatwuer commented 7 years ago

@prathmeshranaut

root folder in skooterapi file

Via ubuntu, I installed ruby ​​on rails directly and imported the skooterapi file to the server with git clone. PostgreSQL and phppgadmin installations Then I did the readme.md file on your process. And I ran the rails.

Ruby on rails new there is something else i need to do ?

byzatwuer commented 7 years ago

Are you going to help ? @prathmeshranaut

prathmeshranaut commented 7 years ago

I am actually looking into the server and code.

On Apr 9, 2017, at 1:29 PM, byzatwuer notifications@github.com wrote:

Are you going to help ? @prathmeshranaut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or mute the thread .

byzatwuer commented 7 years ago

I was doing some processing on the server. I left the server to you @prathmeshranaut

prathmeshranaut commented 7 years ago

The libraries have been updated since we coded this API. I would suggest you to use the code as a starter for creating your own API.

PS: Please change the password of your server.

byzatwuer commented 7 years ago

Ruby on railste I do not know what to do next I can not use this skooterapi I guess. @prathmeshranaut

byzatwuer commented 7 years ago

Ruby on railste new @prathmeshranaut

prathmeshranaut commented 7 years ago

You cant

On Apr 9, 2017, at 1:52 PM, byzatwuer notifications@github.com wrote:

Ruby on railste new @prathmeshranaut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

byzatwuer commented 7 years ago

I did not understand @prathmeshranaut

prathmeshranaut commented 7 years ago

You can use this code to build an API in a language you understand.

On Apr 9, 2017, at 1:54 PM, Aayush Ranaut aayush.ranaut@gmail.com wrote:

You cant

On Apr 9, 2017, at 1:52 PM, byzatwuer notifications@github.com wrote:

Ruby on railste new @prathmeshranaut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

byzatwuer commented 7 years ago

It is not api anyway ? @prathmeshranaut

prathmeshranaut commented 7 years ago

No, it's broken now.

On Apr 9, 2017, at 1:59 PM, byzatwuer notifications@github.com wrote:

It is not api anyway ? @prathmeshranaut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

byzatwuer commented 7 years ago

I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php?

byzatwuer commented 7 years ago

I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php? @prathmeshranaut

prathmeshranaut commented 7 years ago

No, SkooterApp is modular, just modify the API URL. That would be it.

On Apr 9, 2017, at 3:40 PM, byzatwuer notifications@github.com wrote:

I will write the api with php. Do I need to change the content of the SkooterApp? @prathmeshranaut Or do you need to compile the json codes that ı m wrote in php? @prathmeshranaut

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.