Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from gazes-media/main
Browse files Browse the repository at this point in the history
Just fix a minor bug when Anime is Not found
  • Loading branch information
garder500 authored Nov 30, 2023
2 parents 97667bb + a055cd2 commit 88683c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routes/fiche.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package routes

import (
"encoding/json"
"errors"
"gazes_ssr/internal"
"net/http"
)
Expand Down Expand Up @@ -31,6 +32,9 @@ func getAnime(id string) (*JsonResponse, error) {
if err != nil {
return nil, err
}
if !response.Success {
return nil, errors.New("Anime not found")
}
return &response, nil
}

Expand Down

0 comments on commit 88683c9

Please sign in to comment.