diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 3363c8e..3948794 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -1,6 +1,6 @@ class ArticlesController < ApplicationController def index - response = HTTP.get("https://newsapi.org/v2/everything?q=#{params[:search]}&from=2022-07-15&sortBy=publishedAt&apiKey=#{Rails.application.credentials.key_api}&language=en") + response = HTTP.get("https://newsapi.org/v2/everything?q=#{params[:search]}&from=2022-07-15&sortBy=publishedAt&apiKey=#{Rails.application.credentials.news_key_api}&language=en") render json: response.as_json end end diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 0a47072..442c7d1 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -h6q63PxrtAZyBY9LvheVBXv5DBV0L1p28anhUqd9Bve7iX+xHpyShI0YVtcgds5OxRmB0ZFTh0WdhGCN9r0rPxkmVZ/hDKBgewolfEYR+NY+seGcgQMLprQlMY5UO1SUJeTiduvOmRraWhf0yhnhUQYkeiFcvZy9gEW/A8a/UI0rmCefX0WmvbuDUbLlpZcR7i687nvlK8+NfNbvaiyH4FEEumR4FoA6Bi6qWb7zssDqo7nPsiiByrGfpDY0A7sJVd8kZutdusforPn09dDHn+W0aZ1YLf4eMkkHwe8ijQr8Ucq3Rm3CTEFI8H9ci33q2qEXdZ8Fx5petmlQ2iA9Gla3F0jZpXJmhhdC2QwFWet3IVdr0GvZcNs7NZtCt4Z/LzIcVu8HJM1sIAJu95bkGhQCe5JNqfGTMZQE8INsu5tH2bL6vcrZDnTu8e02Yly+PLuj0J6eHQkazvC8ReND--oyEP0VEOeebws0Jc--kqh95vmJrjWyQcpkDVsBiA== \ No newline at end of file +GFM/Bz9gWucDF9z+7KCHQiVnIXgX8PP067Uw89MdxKo79e6qfNixp0zpB/NiQTjJQIKayQsSAd8o8wnBoTFHFckCsouG7u/sK1Yn20kScTFtGhWMx6xbjtCJFnGA/SkbtE60VHy8iUACZL52X/d7B0iKe0YTIIgsXVw4gn2wgjl+1G7lzrleL9QDNsD7s0xSSlfOlsLwdyteyCveuSOQYuaFZT5OhddL5gaYsFm7PdK6xoNNNJDIeLxO+5ZVHIeDQHybMu+yWd2ELehQVo3YXqsALXXuKTkdX5ODyNbh+p4fdiGkQ0kpFziou821hZ+E4G1UTXLLyW03ZLhISEN+ulAm29+2p3f+LUI23LtFW7LUuh8Xrd3DhiT+8MBvLy1TvFF1et69+pT4aG7OC+swxMMyKnNRTzIPevjKRC/TUn3+K14nT96iSNnGdScSIDgR/NsJLeEFjFQ5qMxjulPTED8Nxns=--GMG6waW0STCVytzM--9oAffasqYhiLDA1V2h033A== \ No newline at end of file