Ruby Grape - 将Bigint作为参数

时间:2017-07-20 19:25:49

标签: ruby-on-rails ruby postgresql grape grape-api

这是我正在写的API调用。它适用于INTEGER。但是在PostgreSQL DB中,Hospital_ID是BIGINT。

desc "All Hospital Locations"
params do
  requires :authtoken, type: String, desc: "auth token"
  requires :hospitalid, type: Integer, desc: "hospital ID"
  #requires :hospitalid, type: Virtus::Attribute::Bigint, desc: "hospital ID"
  #Virtus::Attribute::Boolean,
end

我希望能够传递BIGINT或类似的变量。

0 个答案:

没有答案