From 90e4ee1f1bee4db2862a17cbd04febf323a1c6e6 Mon Sep 17 00:00:00 2001 From: hal-wang Date: Sun, 25 Apr 2021 13:59:12 +0800 Subject: [PATCH] fix: query encoding --- package.json | 2 +- src/Map/MapParser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4333cb3..73af234 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hal-wang/cloudbase-access", - "version": "1.2.7", + "version": "1.2.8", "description": "利用 NodeJS 和 CloudBase 快速创建 Serverless RESTful Api", "homepage": "https://github.com/hal-wang/cloudbase-access", "repository": { diff --git a/src/Map/MapParser.ts b/src/Map/MapParser.ts index cc9b49c..947b897 100644 --- a/src/Map/MapParser.ts +++ b/src/Map/MapParser.ts @@ -47,7 +47,7 @@ export default class MapParser { const reqPathStr = reqPathStrs[i]; const key = mapPathStr.substr(1, mapPathStr.length - 1); - const value = reqPathStr; + const value = decodeURIComponent(reqPathStr); this.requestParams.query[key] = value; } }