Skip to content

Commit

Permalink
Merge pull request #34 from karlomikus/develop
Browse files Browse the repository at this point in the history
Fix cocktail index sync #33
  • Loading branch information
karlomikus committed Dec 11, 2022
2 parents d7c253a + e56ce5a commit 35f87b9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v1.0.3
## Fixes
- Sync cocktails and ingredients with meilisearch after docker restart
- Bump version in openapi spec

# v1.0.2
## New
- Add `php artisan bar:scrap` command to scrape recipes from the supported websites
Expand All @@ -9,6 +14,7 @@
## Fixes
- Sort ingredient categories by name
- Sort related cocktails in ingredient resource by name
- Escape ingredient description

## Changes
- Use `docker-php-extension-installer` for docker image
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This repository only contains the API server, if you are looking for easy to use
- Automatic indexing of data in Meilisearch
- Cocktail ingredient substitutes
- Assign glass types to cocktails
- Cocktail recipe scraping

## Planned features
- Cocktail recipe sharing
Expand All @@ -41,8 +42,6 @@ This repository only contains the API server, if you are looking for easy to use
- Cocktail ratings
- Add user notes to cocktail
- Add cocktail flavor profiles
- Cocktail recipe scraping
- Importing and exporting cocktails

## Installation

Expand Down Expand Up @@ -158,6 +157,22 @@ Default login information is:
- email: `[email protected]`
- password: `password`

## FAQ

### I'm missing images of cocktails and ingredients.

Check that you have correctly configured your docker volumes.

It can also mean that there are missing attributes in your indexes. You can run the following command to sync cocktails and ingredients to their indexes:

``` bash
# Docker compose commands:
# Sync cocktails
$ docker compose exec -it bar-assistant php artisan scout:import "Kami\\Cocktail\\Models\\Cocktail"
# Sync ingredients
$ docker compose exec -it bar-assistant php artisan scout:import "Kami\\Cocktail\\Models\\Ingredient"
```

## Contributing

TODO, Fork and create a pull request...
Expand Down
6 changes: 3 additions & 3 deletions app/Console/Commands/BarSearchRefresh.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public function handle()
$this->info('Updating search index settings...');
SearchActions::updateIndexSettings();

// $this->info('Importing cocktails and ingredients...');
// Artisan::call('scout:import', ['model' => "Kami\Cocktail\Models\Cocktail"]);
// Artisan::call('scout:import', ['model' => "Kami\Cocktail\Models\Ingredient"]);
$this->info('Syncing cocktails and ingredients to meilisearch...');
Artisan::call('scout:import', ['model' => "Kami\Cocktail\Models\Cocktail"]);
Artisan::call('scout:import', ['model' => "Kami\Cocktail\Models\Ingredient"]);

return Command::SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions docs/open-api-spec.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: '3.0.2'
info:
title: 'Bar Assistant API'
version: '1.0.0'
version: '1.0.2'
description: |-
Bar assistant is a self hosted application for managing your home bar. It allows you to add ingredients and create custom cocktail recipes.
servers:
Expand Down Expand Up @@ -625,7 +625,7 @@ paths:
get:
tags:
- Images
summary: Get a thumbnail of a response
summary: Get a thumbnail of an image
responses:
'200':
description: Successful response
Expand Down

0 comments on commit 35f87b9

Please sign in to comment.