Archived
frontend et backend: Connexion d'un utilisateur
This commit is contained in:
1 parent
8c37dbaaf4
commit
76298b6087
11 files changed
+184
-31
No files matched your search
@@ -1,6 +1,10 @@
|
||||
function redirect (ctx, path) {
|
||||
ctx.res.writeHead(302, { Location: path });
|
||||
ctx.res.end();
|
||||
function redirect(ctx, path) {
|
||||
if (ctx.res) {
|
||||
ctx.res.writeHead(302, { Location: path });
|
||||
ctx.res.end();
|
||||
} else {
|
||||
document.location.pathname = path;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = redirect;
|
||||
Reference in new issue
Block a user