Skip to content

Instantly share code, notes, and snippets.

View its-YogeshChandra's full-sized avatar

Yogesh Chandra its-YogeshChandra

View GitHub Profile
// controller for login user
const loginUser = asyncHandler(async (req, res) => {
const { username, email, password } = req.body;
if (!(username || email)) {
throw new ApiError(400, "Email or username is missing");
}
const Dbuser = await User.findOne({
"use client";
import React, { useState } from "react";
import { CourseForm } from "./course-form";
import { LessonManager } from "./lesson-manager";
import { PublishCourse } from "./publish-course.jsx";
import { ProgressIndicator } from "./progress-indicator";
import { toast } from "sonner";
import {
addData,