mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-28 01:07:44 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 412531f04e | |||
| b0b25118aa |
@@ -44,11 +44,12 @@ export function buildMessage(
|
||||
const sortedQs = Object.keys(queryParams)
|
||||
.sort()
|
||||
.flatMap((k) => {
|
||||
const ek = encodeURIComponent(k);
|
||||
const v = queryParams[k];
|
||||
if (Array.isArray(v)) {
|
||||
return [...v].sort().map((item) => `${k}=${item}`);
|
||||
return [...v].sort().map((item) => `${ek}=${encodeURIComponent(item)}`);
|
||||
}
|
||||
return [`${k}=${v}`];
|
||||
return [`${ek}=${encodeURIComponent(String(v))}`];
|
||||
})
|
||||
.join("&");
|
||||
return `${subPath}:${sortedQs}:${body}:${timestamp}`;
|
||||
|
||||
Reference in New Issue
Block a user