Skip to content

Commit

Permalink
updates method to domain identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
yordadev committed Aug 22, 2024
1 parent 12a3349 commit 9b6f9f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Repositories/UrlRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static function findByIdentifier(string $identifier): ?ShortUrl
)->with(self::defaultWithRelationship())->first();
}

public static function findByDomainIdentifier(?string $domain, string $identifier): ?ShortUrl
public static function findByDomainIdentifier(string $domain, string $identifier): ?ShortUrl
{
return ShortUrl::where('identifier', $identifier)
->where('domain', $domain)
Expand Down
2 changes: 1 addition & 1 deletion src/Services/ClickService.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static function track(string $identifier, string $request_ip, int $outcom

try {
ClickRepository::createClick(
UrlRepository::findByIdentifier($identifier, $domain)->id,
UrlRepository::findByDomainIdentifier($domain, $identifier)->id,
LocationRepository::findOrCreateLocationRecord(
! config('location.testing.enabled')
? LocationRepository::getLocationFrom($request_ip)
Expand Down

0 comments on commit 9b6f9f5

Please sign in to comment.