Skip to content

Commit

Permalink
Merge pull request #1923 from phili67/phili67-people-controllers-bug
Browse files Browse the repository at this point in the history
People controllers minor bug res
  • Loading branch information
phili67 committed Oct 3, 2021
2 parents ed60125 + 2fb13c9 commit f9580e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/EcclesiaCRM/APIControllers/PeopleFamilyController.php
Expand Up @@ -49,15 +49,15 @@ public function __construct(ContainerInterface $container)
}

public function photo (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
$res = $this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$response = $this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$photo = new Photo("Family", $args['familyId']);
return $res->write($photo->getPhotoBytes())->withHeader('Content-type', $photo->getPhotoContentType());
return $response->write($photo->getPhotoBytes())->withHeader('Content-type', $photo->getPhotoContentType());
}

public function thumbnail (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
$res = $this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$response = $this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$photo = new Photo("Family", $args['familyId']);
return $res->write($photo->getThumbnailBytes())->withHeader('Content-type', $photo->getThumbnailContentType());
return $response->write($photo->getThumbnailBytes())->withHeader('Content-type', $photo->getThumbnailContentType());
}

public function postfamilyproperties (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
Expand Down
8 changes: 4 additions & 4 deletions src/EcclesiaCRM/APIControllers/PeoplePersonController.php
Expand Up @@ -63,15 +63,15 @@ private function generateRandomString($length = 15)
}

public function photo (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
$res=$this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$response=$this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$photo = new Photo("Person",$args['personId']);
return $res->write($photo->getPhotoBytes())->withHeader('Content-type', $photo->getPhotoContentType());
return $response->write($photo->getPhotoBytes())->withHeader('Content-type', $photo->getPhotoContentType());
}

public function thumbnail (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
$res=$this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$response=$this->container->get('CacheProvider')->withExpires($response, MiscUtils::getPhotoCacheExpirationTimestamp());
$photo = new Photo("Person",$args['personId']);
return $res->write($photo->getThumbnailBytes())->withHeader('Content-type', $photo->getThumbnailContentType());
return $response->write($photo->getThumbnailBytes())->withHeader('Content-type', $photo->getThumbnailContentType());
}

public function searchPerson (ServerRequestInterface $request, ResponseInterface $response, array $args): ResponseInterface {
Expand Down

0 comments on commit f9580e1

Please sign in to comment.