♻️ I have no idea what I have done

This commit is contained in:
2025-07-15 01:54:27 +08:00
parent a03b8d1cac
commit 3c11c4f3be
35 changed files with 1761 additions and 930 deletions

View File

@@ -99,22 +99,22 @@ public class AccountServiceGrpc(
return response;
}
public override async Task<ListUserRelationshipSimpleResponse> ListFriends(
ListUserRelationshipSimpleRequest request, ServerCallContext context)
public override async Task<ListRelationshipSimpleResponse> ListFriends(
ListRelationshipSimpleRequest request, ServerCallContext context)
{
var accountId = Guid.Parse(request.AccountId);
var relationship = await relationships.ListAccountFriends(accountId);
var resp = new ListUserRelationshipSimpleResponse();
var resp = new ListRelationshipSimpleResponse();
resp.AccountsId.AddRange(relationship.Select(x => x.ToString()));
return resp;
}
public override async Task<ListUserRelationshipSimpleResponse> ListBlocked(
ListUserRelationshipSimpleRequest request, ServerCallContext context)
public override async Task<ListRelationshipSimpleResponse> ListBlocked(
ListRelationshipSimpleRequest request, ServerCallContext context)
{
var accountId = Guid.Parse(request.AccountId);
var relationship = await relationships.ListAccountBlocked(accountId);
var resp = new ListUserRelationshipSimpleResponse();
var resp = new ListRelationshipSimpleResponse();
resp.AccountsId.AddRange(relationship.Select(x => x.ToString()));
return resp;
}

View File

@@ -7,45 +7,6 @@ using Point = NetTopologySuite.Geometries.Point;
namespace DysonNetwork.Pass.Account;
public abstract class ActionLogType
{
public const string NewLogin = "login";
public const string ChallengeAttempt = "challenges.attempt";
public const string ChallengeSuccess = "challenges.success";
public const string ChallengeFailure = "challenges.failure";
public const string PostCreate = "posts.create";
public const string PostUpdate = "posts.update";
public const string PostDelete = "posts.delete";
public const string PostReact = "posts.react";
public const string MessageCreate = "messages.create";
public const string MessageUpdate = "messages.update";
public const string MessageDelete = "messages.delete";
public const string MessageReact = "messages.react";
public const string PublisherCreate = "publishers.create";
public const string PublisherUpdate = "publishers.update";
public const string PublisherDelete = "publishers.delete";
public const string PublisherMemberInvite = "publishers.members.invite";
public const string PublisherMemberJoin = "publishers.members.join";
public const string PublisherMemberLeave = "publishers.members.leave";
public const string PublisherMemberKick = "publishers.members.kick";
public const string RealmCreate = "realms.create";
public const string RealmUpdate = "realms.update";
public const string RealmDelete = "realms.delete";
public const string RealmInvite = "realms.invite";
public const string RealmJoin = "realms.join";
public const string RealmLeave = "realms.leave";
public const string RealmKick = "realms.kick";
public const string RealmAdjustRole = "realms.role.edit";
public const string ChatroomCreate = "chatrooms.create";
public const string ChatroomUpdate = "chatrooms.update";
public const string ChatroomDelete = "chatrooms.delete";
public const string ChatroomInvite = "chatrooms.invite";
public const string ChatroomJoin = "chatrooms.join";
public const string ChatroomLeave = "chatrooms.leave";
public const string ChatroomKick = "chatrooms.kick";
public const string ChatroomAdjustRole = "chatrooms.role.edit";
}
public class ActionLog : ModelBase
{
public Guid Id { get; set; } = Guid.NewGuid();

View File

@@ -29,7 +29,7 @@ public class Relationship : ModelBase
RelatedId = RelatedId.ToString(),
Account = Account.ToProtoValue(),
Related = Related.ToProtoValue(),
Type = (int)Status,
Status = (int)Status,
CreatedAt = CreatedAt.ToTimestamp(),
UpdatedAt = UpdatedAt.ToTimestamp()
};

View File

@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
using NodaTime;
using Microsoft.EntityFrameworkCore;
using DysonNetwork.Pass.Account;
using DysonNetwork.Shared.Data;
using DysonNetwork.Shared.GeoIp;
namespace DysonNetwork.Pass.Auth;