scp instead of rsync?

This commit is contained in:
Kim 2023-10-23 16:25:34 +02:00
parent 93b56bf1cc
commit 17aa45ae27
2 changed files with 6 additions and 6 deletions

View File

@ -39,8 +39,8 @@ jobs:
SSH_HOST: ${{ secrets.STAGING_SSH_HOST }}
- run: |
cd ${{ gitea.workspace }}
rsync -av ./csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ staging:~/backend
rsync -av ./typescript/frontend-marios2/* staging:~/frontend/
scp -rp ./csharp/App/Backend/bin/Release/net6.0/linux-x64/publish/ staging:~/backend
scp -rp ./typescript/frontend-marios2/* staging:~/frontend/
ssh staging 'sudo systemctl restart backend'
ssh staging 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/'
ssh staging 'sudo npm install -g serve'

View File

@ -257,10 +257,10 @@ public class Controller : ControllerBase
[HttpPost(nameof(CreateUser))]
public ActionResult<User> CreateUser([FromBody] User newUser, Token authToken)
{
var session = new Session(newUser);
var create = Db.GetSession(authToken).Create(newUser);
var session = new Session(Db.GetUserByEmail(newUser.Email)!);
var res = Db.Create(session);
return res && Db.GetSession(authToken).Create(newUser) && Db.SendNewUserEmail(newUser, session.Token)
return res && create && Db.SendNewUserEmail(newUser, session.Token)
? newUser.HidePassword()
: Unauthorized() ;
}
@ -501,7 +501,7 @@ public class Controller : ControllerBase
if (user is null)
return Unauthorized();
// Console.WriteLine("HELP");
return Redirect($"https://monitor.innov.energy/?username={user.Email}");
}