Skip to content
Permalink
Browse files
Update club.js
  • Loading branch information
warangm committed Nov 4, 2022
1 parent 6419ec4 commit 3ff8db9eb50282af148820378b96c501b5843a20
Showing 1 changed file with 8 additions and 4 deletions.
@@ -1,10 +1,14 @@
import Clubs from "../models/Clubs.js";

export const createClub = async (req, res,next) => {
const club = new Clubs(req.body);
try {
const saveClub = await club.save();
res.status(200).json(saveClub);
describe("Post Endpoints", () => {
it("should create a new post", async () => {
const saveClub = await club.save();
res.status(200).json(saveClub);
});
expect(res.statusCode).toEqual(201);
expect(res.body).toHaveProperty("post");
});
} catch (err) {
next(err);
}

0 comments on commit 3ff8db9

Please sign in to comment.