Skip to content

Commit 7fbfc88

Browse files
done
1 parent b30825e commit 7fbfc88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/Services/ProviderService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function link ( int $storeId, int $userId = null ) {
4343
$userId = $userId ?? (store_owner()?->store_id === $storeId ? store_owner_id() : 0);
4444
if ( !$userId ) return notFoundFailed('user');
4545

46-
return $this->firstOrCreate(['supplier_id' => $storeId], ['user_id' => $userId]);
46+
return $this->updateOrCreate(['supplier_id' => $storeId], ['user_id' => $userId]);
4747

4848
}
4949
public function apiLink ( array $params = [] ) {

0 commit comments

Comments
 (0)