| Required role: | super-admin |
| POST | /roles/update |
|---|
import 'package:servicestack/servicestack.dart';
class UpdateRoleResponse implements IResponseRequest, IConvertible
{
int? insertedId;
int? code;
String? message;
UpdateRoleResponse({this.insertedId,this.code,this.message});
UpdateRoleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
insertedId = json['insertedId'];
code = json['code'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'insertedId': insertedId,
'code': code,
'message': message
};
getTypeName() => "UpdateRoleResponse";
TypeContext? context = _ctx;
}
/**
* Cập nhật role
*/
class UpdateRoleRequest implements IPost, IConvertible
{
int? id;
String? name;
bool? isDelete;
UpdateRoleRequest({this.id,this.name,this.isDelete});
UpdateRoleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
isDelete = json['isDelete'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'isDelete': isDelete
};
getTypeName() => "UpdateRoleRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'UpdateRoleResponse': TypeInfo(TypeOf.Class, create:() => UpdateRoleResponse()),
'UpdateRoleRequest': TypeInfo(TypeOf.Class, create:() => UpdateRoleRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /roles/update HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":0,"name":"String","isDelete":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"insertedId":0,"code":0,"message":"String"}