start message to bottom
This commit is contained in:
parent
4bff5be6c1
commit
4e48c5d813
@ -1,8 +1,9 @@
|
||||
import statusCode from "../utils/statusCodes";
|
||||
import { getMessages } from "../db/api";
|
||||
import logger from "../system/Logger";
|
||||
import { Response } from "express";
|
||||
|
||||
export async function messages(body, res) {
|
||||
export async function messages(body, res: Response) {
|
||||
const { roomId } = body;
|
||||
getMessages(roomId).then((messages) => {
|
||||
res.status(statusCode.OK).json(messages);
|
||||
|
@ -29,7 +29,7 @@ onBeforeRouteUpdate(async (to, from) => {
|
||||
|
||||
<template>
|
||||
<div id="main">
|
||||
<Header :room="room"></Header>
|
||||
<Header :id="id"></Header>
|
||||
<div id="RoomViewBody">
|
||||
<div class="content">
|
||||
<Message v-for="(message, index) in store.getters.messages(id)" :key="index" :data="message" />
|
||||
@ -64,7 +64,7 @@ onBeforeRouteUpdate(async (to, from) => {
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: column-reverse;
|
||||
overflow: auto;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user