From 4bc4ff5edad1b75341ecf6bf481572ad93b9e039 Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 4 Oct 2023 15:31:49 +0800 Subject: [PATCH] Update gogs.js --- plugins/gogs/js/gogs.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/plugins/gogs/js/gogs.js b/plugins/gogs/js/gogs.js index 8eb156b66..522415299 100755 --- a/plugins/gogs/js/gogs.js +++ b/plugins/gogs/js/gogs.js @@ -1,19 +1,8 @@ - -function str2Obj(str){ - var data = {}; - kv = str.split('&'); - for(i in kv){ - v = kv[i].split('='); - data[v[0]] = v[1]; - } - return data; -} - function gogsPost(method,args,callback, title){ var _args = null; if (typeof(args) == 'string'){ - _args = JSON.stringify(str2Obj(args)); + _args = JSON.stringify(toArrayObject(args)); } else { _args = JSON.stringify(args); }