Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove videosdk support #110

Merged
merged 2 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 0 additions & 112 deletions server/middleware/auth.js

This file was deleted.

13 changes: 1 addition & 12 deletions server/src/controllers/interviews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ import dotenv from "dotenv";
import Interview from "../models/Interview.js";
import User from "../models/userModel.js";
import Profile from "../models/ProfileModel.js";
import {
createVideoSdkRoom,
fetchVideoSdkRooms,
validateVideoSdkRoom,
deactivateVideoSdkRoom,
} from "../helper/videosdkHelper.js";

dotenv.config();

Expand Down Expand Up @@ -35,10 +29,7 @@ export const scheduleMeeting = async (req: any, res: any) => {
"Content-Type": "application/json",
},
};
const sdkMeeting = await createVideoSdkRoom(options);
if (!sdkMeeting) {
return res.status(500).json({ message: "Error in creating meeting" });
}
// TODO - need to figure out library to use for making http requests
// console.log(email);
let user = await User.findOne({ email: email }).select("-password");
if (!user) {
Expand All @@ -48,7 +39,6 @@ export const scheduleMeeting = async (req: any, res: any) => {
let hr = await User.findOne({ email: req.email }).select("-password");
console.log(user);
const interview = new Interview({
id: sdkMeeting.id,
title: title,
description: description,
startDate: startDate,
Expand All @@ -57,7 +47,6 @@ export const scheduleMeeting = async (req: any, res: any) => {
candidate: user,
hr: hr,
status: "Scheduled",
room: sdkMeeting,
});

try {
Expand Down
1 change: 0 additions & 1 deletion server/src/controllers/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const createToken = (email: string, id: any, role: string, expiresIn: any
else {
permissions = ['ask_join']
}
// referecence: https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/authentication-and-token#payload-while-generating-token
return jwt.sign({
email,
id,
Expand Down
88 changes: 0 additions & 88 deletions server/src/helper/videosdkHelper.ts

This file was deleted.

6 changes: 1 addition & 5 deletions server/src/models/Interview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ const interviewSchema = new Schema<Interview>({
type: String,
enum: ["Scheduled", "Cancelled", "Completed", "Live", "Postponed", "Rescheduled"],
default: "Scheduled",
},
room: {
type: Object,
required: false,
},
}
});

const Interview = mongoose.model<Interview>('Interview', interviewSchema);
Expand Down
1 change: 0 additions & 1 deletion server/src/schemas/InterviewType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface Interview extends Document {
hr: mongoose.Schema.Types.ObjectId;
candidate: mongoose.Schema.Types.ObjectId;
status: 'Scheduled' | 'Cancelled' | 'Completed' | 'Live' | 'Postponed' | 'Rescheduled';
room?: Record<string, any>;
}

export default Interview;
File renamed without changes.
Loading