This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.get("/meetings/:id", (req, res) => { | |
| const id = req.params.id; | |
| const findMeetingsSql = "SELECT * FROM meeting WHERE created_by = ?"; | |
| dbConn.query(findMeetingsSql, [id], function (error, meetings) { | |
| res.status(200).jsonp(meetings); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.post("/meetings", (req, res) => { | |
| const { name, uid, createdBy } = req.body; | |
| if (!name || !uid) { | |
| return res.status(200).jsonp({ message: "Please provide the meeting name and meeting uid" }); | |
| } | |
| const meetings = [[name, uid, createdBy]]; | |
| const createMeetingSql = "INSERT INTO meeting (meeting_title, meeting_uid, created_by) VALUES ?"; | |
| dbConn.query(createMeetingSql, [meetings], function (error, insertedMeeting) { | |
| if (insertedMeeting) { | |
| res.status(200).jsonp({ insertId: insertedMeeting.insertId }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function ({ app, dbConn }) { | |
| app.post("/users/create", (req, res, next) => { | |
| const { id, email, password, fullname, avatar } = req.body; | |
| if (id && email && password && fullname, avatar) { | |
| const findAccountByEmail = "SELECT * FROM user_account WHERE user_email = ?"; | |
| dbConn.query(findAccountByEmail, [email], function (error, account) { | |
| if (account && account.length !== 0) { | |
| res.status(200).jsonp({ message: 'The email existed in the system' }); | |
| } else { | |
| const users = [[id, email, password, fullname, avatar]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function ({ app, dbConn }) { | |
| app.post("/login", (req, res) => { | |
| const { email, password } = req.body; | |
| if (email && password) { | |
| const sql = "SELECT * FROM user_account WHERE user_email = ? AND user_password = ?"; | |
| dbConn.query(sql, [email, password], function (error, response) { | |
| if (response && response.length !== 0) { | |
| res.status(200).jsonp({ ...response[0] }); | |
| } else { | |
| res.status(200).jsonp({ message: "Your username or password is not correct" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const authRoutes = require("./auth"); | |
| const userRoutes = require("./users"); | |
| const meetingRoutes = require("./meetings"); | |
| module.exports = function ({ app, dbConn }) { | |
| authRoutes({ app, dbConn }); | |
| userRoutes({ app, dbConn }); | |
| meetingRoutes({ app, dbConn }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require("dotenv").config(); | |
| const bodyParser = require("body-parser"); | |
| const cors = require("cors"); | |
| const express = require("express"); | |
| const mysql = require("mysql2"); | |
| const path = require("path"); | |
| const PORT = process.env.PORT || 8080; | |
| const app = express(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP DATABASE IF EXISTS zoom; | |
| CREATE DATABASE zoom; | |
| USE zoom; | |
| CREATE TABLE user_account ( | |
| id VARCHAR(255) NOT NULL, | |
| user_email VARCHAR(255) NOT NULL, | |
| user_password VARCHAR(255) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CometChatUI : AppCompatActivity(), BottomNavigationView.OnNavigationItemSelectedListener, OnAlertDialogButtonClickListener { | |
| private var loggedInUsername: TextView? = null | |
| ... | |
| private fun initViewComponent() { | |
| ... | |
| /* FeatureRestriction.isUserSettingsEnabled(object : FeatureRestriction.OnSuccessListener{ | |
| override fun onSuccess(p0: Boolean) { | |
| userSettingsEnabled = p0 | |
| activityCometChatUnifiedBinding?.bottomNavigation?.menu?.findItem(R.id.menu_more)?.isVisible = p0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Image, Text, StyleSheet, TouchableOpacity, Platform } from 'react-native'; | |
| import Video from 'react-native-video'; | |
| import VideoPlayer from 'react-native-video-controls'; | |
| const Post = (props) => { | |
| const { post, toggleLike, toggleFollow, onItemClicked, isFollowHidden } = props; | |
| const onHeartClicked = () => { | |
| toggleLike(post); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { View, Image, StyleSheet, Platform, TouchableOpacity } from 'react-native'; | |
| import Video from 'react-native-video'; | |
| import VideoPlayer from 'react-native-video-controls'; | |
| const ProfilePost = (props) => { | |
| const { post, onItemClicked } = props; | |
| if (!post) { | |
| return <></>; |