12 lines
505 B
TypeScript
12 lines
505 B
TypeScript
import { ApiCall, BaseConnection } from "tsrpc";
|
|
import Room from "../../component/Room/Room";
|
|
import { ReqChangeState, ResChangeState } from "../../shared/protocols/room/PtlChangeState";
|
|
import { ServiceType } from "../../shared/protocols/serviceProto";
|
|
|
|
export default async function (call: ApiCall<ReqChangeState, ResChangeState>) {
|
|
call.succ(0);
|
|
const { state } = call.req;
|
|
const conn: BaseConnection<ServiceType> = call.conn;
|
|
const room: Room = conn.Room;
|
|
room.ChangeState(false, state, conn);
|
|
} |