generated from VLADIMIR/template
add actions and auth
This commit is contained in:
+10
-9
@@ -34,7 +34,7 @@ service EveningDetective {
|
||||
|
||||
rpc GetTeam(GetTeamReq) returns (GetTeamRsp) {
|
||||
option (google.api.http) = {
|
||||
get: "/teams/{id}"
|
||||
get: "/team"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ service EveningDetective {
|
||||
|
||||
rpc AddAction(AddActionReq) returns (AddActionRsp) {
|
||||
option (google.api.http) = {
|
||||
post: "/actions"
|
||||
post: "/team/actions",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -117,12 +118,10 @@ message Application {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message GetTeamReq {
|
||||
int64 id = 1;
|
||||
}
|
||||
message GetTeamReq {}
|
||||
|
||||
message GetTeamRsp {
|
||||
repeated AddActionRsp actions = 1;
|
||||
repeated Action actions = 1;
|
||||
}
|
||||
|
||||
message DeleteTeamsReq {}
|
||||
@@ -130,12 +129,14 @@ message DeleteTeamsReq {}
|
||||
message DeleteTeamsRsp {}
|
||||
|
||||
message AddActionReq {
|
||||
string to = 1;
|
||||
string place = 1;
|
||||
}
|
||||
|
||||
message AddActionRsp {
|
||||
message AddActionRsp {}
|
||||
|
||||
message Action {
|
||||
int64 id = 1;
|
||||
string to = 2;
|
||||
string place = 2;
|
||||
string text = 3;
|
||||
repeated Application applications = 4;
|
||||
}
|
||||
|
||||
+20
-1
@@ -1,6 +1,8 @@
|
||||
### Получение списка комад
|
||||
|
||||
GET http://localhost:8090/teams
|
||||
|
||||
###
|
||||
### Добавление команд
|
||||
|
||||
POST http://localhost:8090/teams
|
||||
|
||||
@@ -14,3 +16,20 @@ POST http://localhost:8090/teams
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### Получение команды
|
||||
|
||||
GET http://localhost:8090/team
|
||||
X-Id: 1
|
||||
X-Password: pass
|
||||
|
||||
|
||||
### Ход команды
|
||||
|
||||
POST http://localhost:8090/team/actions
|
||||
X-Id: 1
|
||||
X-Password: pass
|
||||
|
||||
{
|
||||
"place": "A-1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user