From 43a47711488f75b6f12e592a864fd361a003e5ba Mon Sep 17 00:00:00 2001
From: Matei Adriel <rafaeladriel11@gmail.com>
Date: Sun, 20 Jan 2019 12:40:25 +0200
Subject: [PATCH] typescript(translucid): fixed bugs

Signed-off-by: prescientmoon <git@moonythm.dev>
---
 typescript/translucid/Translucid.js | 2 +-
 typescript/translucid/read.js       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/typescript/translucid/Translucid.js b/typescript/translucid/Translucid.js
index 840a785..89416ab 100644
--- a/typescript/translucid/Translucid.js
+++ b/typescript/translucid/Translucid.js
@@ -19,7 +19,7 @@ class Translucid {
     bind(path = "/", filepath = "", text = false, classes = []) {
         this.app.get(path, async (req, res) => {
             if (!text) {
-                res.sendFile(`${__dirname}/../../${filepath}`);
+                res.sendFile(`${__dirname}/${filepath}`);
             }
             else {
                 const readResults = await read_1.read(filepath);
diff --git a/typescript/translucid/read.js b/typescript/translucid/read.js
index 303dc15..76644a7 100644
--- a/typescript/translucid/read.js
+++ b/typescript/translucid/read.js
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 const fs = require('fs');
 function read(url) {
     return new Promise((resolve, reject) => {
-        fs.readFile(`./${url}`, "utf8", (err, data) => {
+        fs.readFile(`${__dirname}/${url}`, "utf8", (err, data) => {
             if (err)
                 reject(err);
             resolve(data);