Skip to content

Commit

Permalink
fixed #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Samurai016 committed Dec 1, 2022
1 parent f875ca0 commit 41a2d75
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Comuni ITA API](https://samurai016.github.io/Comuni-ITA/)
![Versione](https://img.shields.io/badge/versione-v3.0.1-%23007ec6?style=flat-square)
![Versione](https://img.shields.io/badge/versione-v3.0.2-%23007ec6?style=flat-square)
[![Hosted on Supabase](https://img.shields.io/badge/Hosted%20on%20Supabase-passing?style=flat-square&logo=supabase&labelColor=1c1c1c&color=1c1c1c)](https://axqvoqvbfjpaamphztgd.functions.supabase.co)
[![Leggi la documentazione](https://img.shields.io/badge/Leggi%20la%20documentazione%20Swagger-passing?style=flat-square&logo=Read%20the%20Docs&labelColor=8CA1AF&color=8CA1AF&logoColor=white)](https://samurai016.github.io/Comuni-ITA/)

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/comuni-ita.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info:
Semplice API che permette di ottenere in formato JSON i comuni italiani.
*Logo ispired by: [Castle by Jasfart from the Noun Project](https://thenounproject.com/omataloon/)*
version: 3.0.1
version: 3.0.2
x-logo:
url: ./assets/logo.png
altText: Comuni ITA Logo
Expand Down
2 changes: 1 addition & 1 deletion docs/comuni-ita.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Comuni ITA",
"description": "Semplice API che permette di ottenere in formato JSON i comuni italiani.\n\n*Logo ispired by: [Castle by Jasfart from the Noun Project](https://thenounproject.com/omataloon/)*",
"version": "3.0.1",
"version": "3.0.2",
"x-logo": {
"url": "./assets/logo.png",
"altText": "Comuni ITA Logo"
Expand Down
6 changes: 3 additions & 3 deletions supabase/functions/comuni/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import requestHandler from "../../requestHandler.ts";
import requestHandler from "../requestHandler.ts";

serve(async (req) => {
return await requestHandler(req, async () => {
Expand All @@ -25,9 +25,9 @@ serve(async (req) => {

// Filtri
if (regione) {
query = query.ilike("provincia.regione.nome", regione.toLowerCase());
query = query.ilike("provincia.regione.nome", decodeURI(regione.toLowerCase()));
} else if (provincia) {
query = query.ilike("provincia.nome", provincia.toLowerCase());
query = query.ilike("provincia.nome", decodeURI(provincia.toLowerCase()));
}

if (params.has("nome")) {
Expand Down
4 changes: 2 additions & 2 deletions supabase/functions/province/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import requestHandler from "../../requestHandler.ts";
import requestHandler from "../requestHandler.ts";

serve(async (req) => {
return await requestHandler(req, async () => {
Expand All @@ -20,7 +20,7 @@ serve(async (req) => {

// Filtri
if (regione) {
query = query.ilike("regione.nome", regione.toLowerCase());
query = query.ilike("regione.nome", decodeURI(regione.toLowerCase()));
}

if (params.has("nome")) {
Expand Down
2 changes: 1 addition & 1 deletion supabase/functions/regioni/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import requestHandler from "../../requestHandler.ts";
import requestHandler from "../requestHandler.ts";

serve(async (req) => {
return await requestHandler(req, async () => {
Expand Down
File renamed without changes.

0 comments on commit 41a2d75

Please sign in to comment.