Skip to content

Commit

Permalink
refactor: remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissantillan committed Jan 19, 2024
1 parent 0314969 commit be423cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Services/CanvasServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public function listUsers(string $accountId = 'self'): mixed
{
// $base_url = $this->api_url.ACCOUNTS.self::fmtUrl($accountId).USERS;
try {
// $response = $this->client->get(ACCOUNTS.self::fmtUrl($accountId).USERS, ['headers' => ['Authorization' => 'Bearer '.$this->access_key]]);
$response = $this->client->get(ACCOUNTS.self::fmtUrl($accountId).USERS);
} catch (RequestException $e) {
throw new \Exception(API_ERROR.$e->getMessage());
Expand Down Expand Up @@ -345,7 +344,8 @@ public function listCourses(): mixed
{
$base_url = $this->api_url.COURSES;
try {
$response = $this->client->get($base_url.COURSES);
// $response = $this->client->get($base_url.COURSES);
$response = $this->client->get(COURSES);
} catch (RequestException $e) {
throw new \Exception(API_ERROR.$e->getMessage());
}
Expand Down Expand Up @@ -411,7 +411,8 @@ public function getEnrollmentsByUser(string $userId): mixed
{
$base_url = $this->api_url.USERS.self::fmtUrl($userId).ENROLLMENTS;
try {
$response = $this->client->get($base_url);
// $response = $this->client->get($base_url);
$response = $this->client->get(USERS.self::fmtUrl($userId).ENROLLMENTS);
} catch (RequestException $e) {
throw new \Exception(API_ERROR.$e->getMessage());
}
Expand Down

0 comments on commit be423cf

Please sign in to comment.