Skip to content

Commit

Permalink
fix: DEV-3235 validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
michtio committed Feb 3, 2025
1 parent 36c0716 commit e9b1c53
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## 5.6.2 - 2025-02-03
### Added
- Fixed an issue where choosing "single" would end up in validation errors [#47](https://github.com/craftpulse/craft-typesense/issues/47)

## 5.6.1 - 2025-01-24
### Fixed
- Fixed an issue where the settings wouldn't display if "Single" was selected as an option [#46](https://github.com/craftpulse/craft-typesense/issues/46)

## 5.6.0 - 2025-01-06
### Added
- Added support for synonyms
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "craftpulse/craft-typesense",
"description": "Craft Plugin that synchronises with Typesense",
"type": "craft-plugin",
"version": "5.6.1",
"version": "5.6.2",
"keywords": [
"craft",
"cms",
Expand All @@ -11,16 +11,16 @@
"typesense"
],
"support": {
"email": "support@percipio.london",
"docs": "https://github.com/percipioglobal/craft-typesense/blob/master/README.md",
"issues": "https://github.com/percipioglobal/craft-typesense/issues",
"source": "https://github.com/percipioglobal/craft-typesense"
"email": "support@craft-pulse.com",
"docs": "https://github.com/craftpulse/craft-typesense/blob/master/README.md",
"issues": "https://github.com/craftpulse/craft-typesense/issues",
"source": "https://github.com/craftpulse/craft-typesense"
},
"license": "MIT",
"authors": [
{
"name": "percipiolondon",
"homepage": "https://percipio.london"
"name": "CraftPulse",
"homepage": "https://craft-pulse.com"
}
],
"require": {
Expand Down Expand Up @@ -53,10 +53,10 @@
"extra": {
"name": "Typesense",
"handle": "typesense",
"developer": "percipiolondon",
"developerUrl": "https://percipio.london",
"documentationUrl": "https://github.com/percipioglobal/craft-typesense/blob/master/README.md",
"changelogUrl": "https://raw.githubusercontent.com/percipioglobal/craft-typesense/master/CHANGELOG.md",
"developer": "craftpulse",
"developerUrl": "https://craft-pulse.com",
"documentationUrl": "https://github.com/craftpulse/craft-typesense/blob/v5/README.md",
"changelogUrl": "https://raw.githubusercontent.com/craftpulse/craft-typesense/v5/CHANGELOG.md",
"components": {
"typesenseService": "percipiolondon\\typesense\\services\\TypesenseService"
},
Expand Down
2 changes: 1 addition & 1 deletion src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Settings extends Model
* @const int
* @var string
*/
public const TYPESENSE_SERVER = 'server';
public const TYPESENSE_SERVER = 'single';

/**
* @const int
Expand Down
2 changes: 1 addition & 1 deletion src/services/TypesenseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function client(): ?TypesenseClient
$client = null;

try {
if (Typesense::$plugin->getSettings()->serverType === 'server' && App::parseEnv(Typesense::$plugin->getSettings()->apiKey)) {
if (Typesense::$plugin->getSettings()->serverType === 'single' && App::parseEnv(Typesense::$plugin->getSettings()->apiKey)) {
$client = new TypesenseClient([
'api_key' => App::parseEnv(Typesense::$plugin->getSettings()->apiKey),
'nodes' => [
Expand Down

0 comments on commit e9b1c53

Please sign in to comment.