mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 07:42:26 -05:00 
			
		
		
		
	[feature] Create/update/remove domain permission subscriptions (#3623)
* [feature] Create/update/remove domain permission subscriptions * lint * envparsing * remove errant fmt.Println * create drafts, subs, exclude, from snapshot models * name etag column correctly * remove count column * lint
This commit is contained in:
		
					parent
					
						
							
								77f1e79532
							
						
					
				
			
			
				commit
				
					
						e9bb7ddd3a
					
				
			
		
					 50 changed files with 4630 additions and 172 deletions
				
			
		|  | @ -115,3 +115,19 @@ func (p *Processor) apiDomainPerm( | |||
| 
 | ||||
| 	return apiDomainPerm, nil | ||||
| } | ||||
| 
 | ||||
| // apiDomainPermSub is a cheeky shortcut for returning the | ||||
| // API version of the given domain permission subscription, | ||||
| // or an appropriate error if something goes wrong. | ||||
| func (p *Processor) apiDomainPermSub( | ||||
| 	ctx context.Context, | ||||
| 	domainPermSub *gtsmodel.DomainPermissionSubscription, | ||||
| ) (*apimodel.DomainPermissionSubscription, gtserror.WithCode) { | ||||
| 	apiDomainPermSub, err := p.converter.DomainPermSubToAPIDomainPermSub(ctx, domainPermSub) | ||||
| 	if err != nil { | ||||
| 		err := gtserror.NewfAt(3, "error converting domain permission subscription to api model: %w", err) | ||||
| 		return nil, gtserror.NewErrorInternalError(err) | ||||
| 	} | ||||
| 
 | ||||
| 	return apiDomainPermSub, nil | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue