mirror of
https://github.com/NicolasConstant/BirdsiteLive
synced 2025-06-05 21:49:16 +02:00
add admin email to nodeinfo metadata
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
public class InstanceSettings
|
public class InstanceSettings
|
||||||
{
|
{
|
||||||
public string Domain { get; set; }
|
public string Domain { get; set; }
|
||||||
|
public string AdminEmail { get; set; }
|
||||||
public string PostgresConnString { get; set; }
|
public string PostgresConnString { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -77,6 +77,10 @@ namespace BirdsiteLive.Controllers
|
|||||||
{
|
{
|
||||||
inbound = new object[0],
|
inbound = new object[0],
|
||||||
outbound = new object[0]
|
outbound = new object[0]
|
||||||
|
},
|
||||||
|
metadata = new Metadata()
|
||||||
|
{
|
||||||
|
email = _settings.AdminEmail
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return new JsonResult(nodeInfo);
|
return new JsonResult(nodeInfo);
|
||||||
@@ -109,6 +113,10 @@ namespace BirdsiteLive.Controllers
|
|||||||
{
|
{
|
||||||
inbound = new object[0],
|
inbound = new object[0],
|
||||||
outbound = new object[0]
|
outbound = new object[0]
|
||||||
|
},
|
||||||
|
metadata = new Metadata()
|
||||||
|
{
|
||||||
|
email = _settings.AdminEmail
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return new JsonResult(nodeInfo);
|
return new JsonResult(nodeInfo);
|
||||||
|
7
src/BirdsiteLive/Models/WellKnownModels/Metadata.cs
Normal file
7
src/BirdsiteLive/Models/WellKnownModels/Metadata.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace BirdsiteLive.Models.WellKnownModels
|
||||||
|
{
|
||||||
|
public class Metadata
|
||||||
|
{
|
||||||
|
public string email { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,6 @@
|
|||||||
namespace BirdsiteLive.Models.WellKnownModels
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace BirdsiteLive.Models.WellKnownModels
|
||||||
{
|
{
|
||||||
public class NodeInfoV20
|
public class NodeInfoV20
|
||||||
{
|
{
|
||||||
@@ -8,6 +10,6 @@
|
|||||||
public Usage usage { get; set; }
|
public Usage usage { get; set; }
|
||||||
public bool openRegistrations { get; set; }
|
public bool openRegistrations { get; set; }
|
||||||
public Services services { get; set; }
|
public Services services { get; set; }
|
||||||
//public object metadata { get; set; }
|
public Metadata metadata { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -8,6 +8,6 @@
|
|||||||
public bool openRegistrations { get; set; }
|
public bool openRegistrations { get; set; }
|
||||||
public SoftwareV21 software { get; set; }
|
public SoftwareV21 software { get; set; }
|
||||||
public Services services { get; set; }
|
public Services services { get; set; }
|
||||||
//public object metadata { get; set; }
|
public Metadata metadata { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -9,6 +9,7 @@
|
|||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"Instance": {
|
"Instance": {
|
||||||
"Domain": "domain.name",
|
"Domain": "domain.name",
|
||||||
|
"AdminEmail": "me@domain.name",
|
||||||
"PostgresConnString": "Host=127.0.0.1;Username=username;Password=password;Database=mydb"
|
"PostgresConnString": "Host=127.0.0.1;Username=username;Password=password;Database=mydb"
|
||||||
},
|
},
|
||||||
"Twitter": {
|
"Twitter": {
|
||||||
|
Reference in New Issue
Block a user