add admin email to nodeinfo metadata
This commit is contained in:
parent
e52f2b8c73
commit
a23271613d
6 changed files with 22 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
public class InstanceSettings
|
||||
{
|
||||
public string Domain { get; set; }
|
||||
|
||||
public string AdminEmail { get; set; }
|
||||
public string PostgresConnString { get; set; }
|
||||
}
|
||||
}
|
|
@ -77,6 +77,10 @@ namespace BirdsiteLive.Controllers
|
|||
{
|
||||
inbound = new object[0],
|
||||
outbound = new object[0]
|
||||
},
|
||||
metadata = new Metadata()
|
||||
{
|
||||
email = _settings.AdminEmail
|
||||
}
|
||||
};
|
||||
return new JsonResult(nodeInfo);
|
||||
|
@ -109,6 +113,10 @@ namespace BirdsiteLive.Controllers
|
|||
{
|
||||
inbound = new object[0],
|
||||
outbound = new object[0]
|
||||
},
|
||||
metadata = new Metadata()
|
||||
{
|
||||
email = _settings.AdminEmail
|
||||
}
|
||||
};
|
||||
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
|
||||
{
|
||||
|
@ -8,6 +10,6 @@
|
|||
public Usage usage { get; set; }
|
||||
public bool openRegistrations { 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 SoftwareV21 software { get; set; }
|
||||
public Services services { get; set; }
|
||||
//public object metadata { get; set; }
|
||||
public Metadata metadata { get; set; }
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
"AllowedHosts": "*",
|
||||
"Instance": {
|
||||
"Domain": "domain.name",
|
||||
"AdminEmail": "me@domain.name",
|
||||
"PostgresConnString": "Host=127.0.0.1;Username=username;Password=password;Database=mydb"
|
||||
},
|
||||
"Twitter": {
|
||||
|
|
Reference in a new issue