mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 09:17:30 -06:00
refining some serialization
This commit is contained in:
parent
1025ac31aa
commit
9eb8878e94
4 changed files with 12 additions and 5 deletions
|
|
@ -41,8 +41,8 @@ type Application struct {
|
|||
VapidKey string
|
||||
}
|
||||
|
||||
// ToMasto returns this application as a mastodon api type, ready for serialization
|
||||
func (a *Application) ToMasto() *mastotypes.Application {
|
||||
// ToMastoSensitive returns this application as a mastodon api type, ready for serialization
|
||||
func (a *Application) ToMastoSensitive() *mastotypes.Application {
|
||||
return &mastotypes.Application{
|
||||
ID: a.ID,
|
||||
Name: a.Name,
|
||||
|
|
@ -53,3 +53,10 @@ func (a *Application) ToMasto() *mastotypes.Application {
|
|||
VapidKey: a.VapidKey,
|
||||
}
|
||||
}
|
||||
|
||||
func (a *Application) ToMastoPublic() *mastotypes.Application {
|
||||
return &mastotypes.Application{
|
||||
Name: a.Name,
|
||||
Website: a.Website,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue