Allow configuration of the service URLs by ENV variables
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m37s
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m37s
This commit is contained in:
parent
735e16ed2c
commit
babbbf2be5
@ -1,7 +1,7 @@
|
||||
module Panopto
|
||||
# @param [String] folder_id
|
||||
def self.list_folder(folder_id)
|
||||
HTTParty.get("https://lectures.joshuacoles.me/api/list", query: {
|
||||
HTTParty.get("#{PANOPTO_PORTAL_URL}/api/list", query: {
|
||||
folderId: folder_id
|
||||
})
|
||||
end
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
module Toggl
|
||||
def self.entries_for_project(toggl_project_id, start_time:, end_time:)
|
||||
JSON.parse(HTTParty.post(
|
||||
"http://localhost:3005/report",
|
||||
"#{TOGGL_PORTAL_URL}/report",
|
||||
body: {
|
||||
"start_date": start_time.to_date.to_fs(),
|
||||
"end_date": end_time.to_date.to_fs(),
|
||||
@ -13,7 +13,7 @@ module Toggl
|
||||
|
||||
def self.start_time_entry(description:, project_id:)
|
||||
HTTParty.post(
|
||||
"http://localhost:3005/start_time_entry",
|
||||
"#{TOGGL_PORTAL_URL}/start_time_entry",
|
||||
body: {
|
||||
"created_with": "Attendance Tracker",
|
||||
"description": description,
|
||||
|
||||
2
config/initializers/services.rb
Normal file
2
config/initializers/services.rb
Normal file
@ -0,0 +1,2 @@
|
||||
TOGGL_PORTAL_URL = ENV['TOGGL_PORTAL_URL'] || 'http://localhost:3005'
|
||||
PANOPTO_PORTAL_URL = ENV['PANOPTO_PORTAL_URL'] || 'https://lectures.joshuacoles.me'
|
||||
Loading…
Reference in New Issue
Block a user