Implement stub endpoints and stub login logic
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6ac6c731d0
commit
fe44bf737d
@ -1,17 +1,24 @@
|
|||||||
|
using ShoopNCook.Controllers;
|
||||||
|
|
||||||
namespace ShoopNCook.Pages;
|
namespace ShoopNCook.Pages;
|
||||||
|
|
||||||
public partial class RegisterPage : ContentPage
|
public partial class RegisterPage : ContentPage
|
||||||
{
|
{
|
||||||
public RegisterPage()
|
private readonly RegisterController controller;
|
||||||
|
public RegisterPage(RegisterController controller)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.controller = controller;
|
||||||
}
|
}
|
||||||
private async void LoginTapped(object sender, EventArgs e)
|
private async void LoginTapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.GoToAsync("//LoginPage");
|
await Shell.Current.GoToAsync("//Login");
|
||||||
}
|
}
|
||||||
private async void RegisterTapped(object sender, EventArgs e)
|
private void RegisterTapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.GoToAsync("//LoginPage");
|
string email = EmailEntry.Text;
|
||||||
|
string password = PasswordEntry.Text;
|
||||||
|
string username = UserNameEntry.Text;
|
||||||
|
controller.Register(username, email, password);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue