mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(dashboard): add opengraph/oembed, Docker build
This commit is contained in:
parent
d956bd4577
commit
15d48db6f3
12 changed files with 253 additions and 1 deletions
|
|
@ -97,6 +97,21 @@ public class GroupControllerV2: PKControllerBase
|
|||
return Ok(group.ToJson(ContextFor(group), system.Hid));
|
||||
}
|
||||
|
||||
[HttpGet("groups/{groupRef}/oembed.json")]
|
||||
public async Task<IActionResult> GroupEmbed(string groupRef)
|
||||
{
|
||||
var group = await ResolveGroup(groupRef);
|
||||
if (group == null)
|
||||
throw Errors.GroupNotFound;
|
||||
var system = await _repo.GetSystem(group.System);
|
||||
|
||||
var name = group.NameFor(LookupContext.ByNonOwner);
|
||||
if (system.Name != null)
|
||||
name += $" ({system.Name})";
|
||||
|
||||
return Ok(APIJsonExt.EmbedJson(name, "Group"));
|
||||
}
|
||||
|
||||
[HttpPatch("groups/{groupRef}")]
|
||||
public async Task<IActionResult> DoGroupPatch(string groupRef, [FromBody] JObject data)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue