Skip to content

Commit

Permalink
fix bdd errors b00tc4mp#211
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos committed Sep 12, 2024
1 parent 74e141f commit 6418a32
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions staff/carlos-bock/json-bbdd/errors/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

const CredentialsError = require("./credentials.js");
const EmailNotValidError = require("./email-not-valid.js");
const NotFoundError = reqruire("./not-an-integer.js");
const NotAnIntegerError = require(".not-an-integer.js");
const NotFoundError = require("./not-found.js");
const NotAnIntegerError = require("./not-an-integer.js");
module.exports = {
CredentialsError,
EmailNotValidError,
Expand Down
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/errors/not-an-integer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function NotAnIntegerError(message) {
return instance;
}

NotAnIntegerError.prototype = Object.create(error.prototype);
NotAnIntegerError.prototype = Object.create(Error.prototype);

NotAnIntegerError.prototype.name = "NotAnIntegerError";

Expand Down
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/interface/create-user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const readline = require("readline");
const { users } = require(".../scripts");
const { users } = require("../scripts");

const rl = readline.createInterface(process.stdin, process.stdout);

Expand Down
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const users = require("./users");
const users = require("../users");

module.exports = { users };
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/users/delete-one.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require("fs");
const path = require("path");
const read = require("./read-all.js");
const { NotFoundError, CredentialsError } = require("../..errors");
const { NotFoundError, CredentialsError } = require("../errors");

function deleteOne(id, password, callback) {
read((users) => {
Expand Down
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const createOne = require("./create-one.js");
const deleteOne = require("./delete-one.js");
const readAll = require("./read-all.js");
const readOne = require(".read-one.js");
const readOne = require("./read-one.js");
const updateById = require("./update-by-id.js");

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion staff/carlos-bock/json-bbdd/users/read-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require("path");

function readAll(callback) {
fs.readFile(
path.join(__dirname, "../../database/users.json"),
path.join(__dirname, "/../../json-bbdd/database/users.json"),
"utf-8",
(err, _data) => {
if (err) throw err;
Expand Down

0 comments on commit 6418a32

Please sign in to comment.