Skip to content

Commit e66e8c3

Browse files
committed
Refactored Tasks. Server now accepts callbacks. HttpTasks merged into UnityTasks
1 parent 34784b5 commit e66e8c3

16 files changed

+1223
-273
lines changed

Foundation Server.zip

13.9 KB
Binary file not shown.

Foundation Server/Foundation.Server/Controllers/AccountController.cs

-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ public string AesKey
3636
[Route("api/Account/Get")]
3737
public async Task<IHttpActionResult> Get()
3838
{
39-
// Registered User
40-
if (await AppDatabase.Users.AnyAsync(o => o.Id == UserId))
41-
return BadRequest("UserId is in use. Try password reset.");
42-
4339
var user = await AppDatabase.Users.FirstOrDefaultAsync(o => o.Id == UserId);
4440

4541
if (user == null)

Foundation/Assets/Foundation/Example/ServerTests.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Linq;
55
using Facebook.Unity;
66
using Foundation.Server;
7+
using Foundation.Server.Api;
78
using Foundation.Tasks;
89
using UnityEngine;
910

@@ -131,7 +132,7 @@ IEnumerator AccountsAsync()
131132
Debug.Log("SignIn...");
132133
yield return StartCoroutine(TaskAsync(account.SignIn(Email1, Password)));
133134
Debug.Log(string.Format("Account : {0} {1} {2}", account.IsAuthenticated, account.Account.Email, account.Account.Id));
134-
135+
135136
// out
136137
Debug.Log("Delete...");
137138
yield return StartCoroutine(TaskAsync(account.Delete(Password)));
@@ -186,6 +187,8 @@ IEnumerator AccountsAsync()
186187
yield return StartCoroutine(TaskAsync(account.Update(Email1, Password)));
187188
Debug.Log(string.Format("Account : {0} {1} {2}", account.IsAuthenticated, account.Account.Email, account.Account.Id));
188189

190+
Debug.Log("Done");
191+
189192
}
190193

191194

Binary file not shown.

0 commit comments

Comments
 (0)