Skip to content

Commit

Permalink
docs(readme): update prime login example (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Forster authored Jun 23, 2022
1 parent 1af62a7 commit 50e8c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const ftpServer = new FtpSrv({
anonymous: true
});

ftpServer.on('login', (data, resolve, reject) => {
if(data.username === 'anonymous' && data.password === 'anonymous'){
ftpServer.on('login', ({ connection, username, password }, resolve, reject) => {
if(username === 'anonymous' && password === 'anonymous'){
return resolve({ root:"/" });
}
return reject(new errors.GeneralError('Invalid username or password', 401));
Expand Down

0 comments on commit 50e8c45

Please sign in to comment.