Created UserService and TrashService
This commit is contained in:
@ -9,9 +9,19 @@ namespace services
|
||||
{
|
||||
public class TrashService
|
||||
{
|
||||
public static Trash GetTrash(String id)
|
||||
public static Trash GetTrash(String token, String id)
|
||||
{
|
||||
return Api<Trash>.get("/api/collections/trashs/records/"+id);
|
||||
return Api<Trash>.get("/api/collections/trashs/records/"+id, token);
|
||||
}
|
||||
|
||||
public static TrashList ListTrash(String token)
|
||||
{
|
||||
return Api<TrashList>.get("/api/collections/trashs/records/", token);
|
||||
}
|
||||
|
||||
public static DataList ListTrashData(String token, String trashId)
|
||||
{
|
||||
return Api<DataList>.get("/api/collections/data/records/?trash_id="+trashId, token);
|
||||
}
|
||||
}
|
||||
}
|
15
services/UserService.cs
Normal file
15
services/UserService.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using models;
|
||||
using UnityEngine;
|
||||
using utils;
|
||||
|
||||
namespace services
|
||||
{
|
||||
public class UserService
|
||||
{
|
||||
public static LoginResponse Login(LoginRequest request)
|
||||
{
|
||||
var response = Api<LoginResponse>.post("/api/collections/users/auth-with-password", JsonUtility.ToJson(request));
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
3
services/UserService.cs.meta
Normal file
3
services/UserService.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fe63392645946c48c112658ebbf75c5
|
||||
timeCreated: 1679389336
|
Reference in New Issue
Block a user