Add SERVER_ID and PORT

This commit is contained in:
2024-06-29 21:45:38 -04:00
Unverified
parent 58b38f3d2d
commit 9ed9ae5078
4 changed files with 33 additions and 31 deletions

View File

@@ -6,19 +6,19 @@ pub trait RealmChat {
async fn test(name: String) -> String;
//TODO: Any user authorized as themselves
async fn send_message(message: Message) -> Result<Message, ErrorCode>;
async fn start_typing() -> ErrorCode;
async fn stop_typing() -> ErrorCode;
async fn keep_typing() -> ErrorCode; //NOTE: If a keep alive hasn't been received in 5 seconds, stop typing
async fn send_message(auth_token: String, message: Message) -> Result<Message, ErrorCode>;
async fn start_typing(auth_token: String) -> ErrorCode;
async fn stop_typing(auth_token: String) -> ErrorCode;
async fn keep_typing(auth_token: String) -> ErrorCode; //NOTE: If a keep alive hasn't been received in 5 seconds, stop typing
//NOTE: Any user can call, if they are in the server
async fn get_message_from_id(id: u32) -> Result<Message, ErrorCode>;
async fn get_messages_since(time: DateTime<Utc>) -> Result<Vec<Message>, ErrorCode>;
async fn get_rooms() -> Result<Vec<Room>, ErrorCode>;
async fn get_room(roomid: String) -> Result<Room, ErrorCode>;
async fn get_message_from_id(auth_token: String, id: u32) -> Result<Message, ErrorCode>;
async fn get_messages_since(auth_token: String, time: DateTime<Utc>) -> Result<Vec<Message>, ErrorCode>;
async fn get_rooms(auth_token: String) -> Result<Vec<Room>, ErrorCode>;
async fn get_room(auth_token: String, roomid: String) -> Result<Room, ErrorCode>;
async fn get_user(userid: String) -> Result<User, ErrorCode>;
async fn get_users(get_only_online: bool) -> Result<Vec<User>, ErrorCode>;
//TODO: Admin access only!
// async fn create_room() -> Result<Room, ErrorCode>;
// delete room