| Required role: | super-admin |
| POST | /users/update-deparment |
|---|
import 'package:servicestack/servicestack.dart';
class UpdateUserResponse implements IResponseRequest, IConvertible
{
int? updatedId;
int? code;
String? message;
UpdateUserResponse({this.updatedId,this.code,this.message});
UpdateUserResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
updatedId = json['updatedId'];
code = json['code'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'updatedId': updatedId,
'code': code,
'message': message
};
getTypeName() => "UpdateUserResponse";
TypeContext? context = _ctx;
}
class UserDeparmentRequest implements IConvertible
{
int? userId;
int? departmentId;
UserDeparmentRequest({this.userId,this.departmentId});
UserDeparmentRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
userId = json['userId'];
departmentId = json['departmentId'];
return this;
}
Map<String, dynamic> toJson() => {
'userId': userId,
'departmentId': departmentId
};
getTypeName() => "UserDeparmentRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'UpdateUserResponse': TypeInfo(TypeOf.Class, create:() => UpdateUserResponse()),
'UserDeparmentRequest': TypeInfo(TypeOf.Class, create:() => UserDeparmentRequest()),
});
Dart UserDeparmentRequest DTOs
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 /users/update-deparment HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"userId":0,"departmentId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"updatedId":0,"code":0,"message":"String"}