fix: some errors in api

This commit is contained in:
lijing 2018-11-19 00:20:25 +08:00
parent 11e9a5b781
commit 73d47bc5bd
3 changed files with 6 additions and 6 deletions

View File

@ -215,11 +215,11 @@ GstoreConnector::disconnect()
}
*/
string
GstoreConnector::user(string type, string username1, string password1, string username2, string addtion)
GstoreConnector::user(string type, string username1, string password1, string username2, string addition)
{
string url = "http://" + this->serverIP + ":" + std::to_string(this->serverPort);
string cmd = url + "/?operation=user&type=" + type + "&username1=" + username1 + "&password1=" + password1 + "&username2=" + username2 + "&addtion=" + addtion;
string cmd = url + "/?operation=user&type=" + type + "&username1=" + username1 + "&password1=" + password1 + "&username2=" + username2 + "&addition=" + addition;
string recv_msg;
int ret = hc.Get(cmd, recv_msg);
return recv_msg;

View File

@ -328,14 +328,14 @@ public class GstoreConnector {
this.disconnect();
return msg;
}
public String user(String type, String username1, String password1, String username2, String addtion) {
public String user(String type, String username1, String password1, String username2, String addition) {
boolean connect_return = this.connect();
if (!connect_return) {
System.err.println("connect to server error. @GstoreConnector.show");
return "connect to server error.";
}
String cmd = "?operation=user&type=" + type + "&username1=" + username1 + "&password1=" + password1 + "&username2=" + username2 + "&addtion=" + addtion;
String cmd = "?operation=user&type=" + type + "&username1=" + username1 + "&password1=" + password1 + "&username2=" + username2 + "&addition=" + addition;
String msg = this.sendGet(cmd);
this.disconnect();

View File

@ -83,8 +83,8 @@ class GstoreConnector:
cmd = self.Url + "/?operation=show"
return Get(cmd)
def user(self, type, username1, password1, username2, addtion):
cmd = self.Url + "/?operation=user&type=" + type + "&username1=" + username1+ "&password1=" + password1 + "&username2=" + username2 + "&addtion=" +addition
def user(self, type, username1, password1, username2, addition):
cmd = self.Url + "/?operation=user&type=" + type + "&username1=" + username1+ "&password1=" + password1 + "&username2=" + username2 + "&addition=" +addition
return self.Get(cmd)
def showUser(self):