Skip to content
Open
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
2 changes: 1 addition & 1 deletion db.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"title": "Responsividade",
"description": "gedg",
"status": "Pendente",
"date": "16/04/2026",
"date": "22/04/2026",
"userId": 1
},
{
Expand Down
2 changes: 1 addition & 1 deletion usuario/usuario.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>TaskMaster</h1>
</div>
</aside>
<main id="app"></main>
<script src="usuarioclass.js"></script>
<script src="../usuarioclass.js"></script>
<script src="usuario.js"></script>
</body>

Expand Down
4 changes: 3 additions & 1 deletion usuario/usuario.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
const user = JSON.parse(localStorage.getItem('user'));
const LINK_JSON = "http://localhost:3000";

if (!user) {
if (!userData) {
window.location.href = '/index.html';
}

const user = new Usuario(userData);

const statusConfig = {
"Completa": {
classe: "completa",
Expand Down
2 changes: 1 addition & 1 deletion usuarioclass.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class Usuario {
}
}

module.exports = Usuario;
if (typeof module !== 'undefined') module.exports = Usuario;