mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 23:52:26 -06:00 
			
		
		
		
	Inbox POST from federated servers now working for statuses and follow requests.
    Follow request client API added.
    Start work on federating outgoing messages.
    Other fixes and changes/tidying up.
		
	
			
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			554 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			554 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package instance
 | 
						|
 | 
						|
import (
 | 
						|
	"net/http"
 | 
						|
 | 
						|
	"github.com/gin-gonic/gin"
 | 
						|
)
 | 
						|
 | 
						|
// InstanceInformationGETHandler is for serving instance information at /api/v1/instance
 | 
						|
func (m *Module) InstanceInformationGETHandler(c *gin.Context) {
 | 
						|
	l := m.log.WithField("func", "InstanceInformationGETHandler")
 | 
						|
 | 
						|
	instance, err := m.processor.InstanceGet(m.config.Host)
 | 
						|
	if err != nil {
 | 
						|
		l.Debugf("error getting instance from processor: %s", err)
 | 
						|
		c.JSON(http.StatusInternalServerError, gin.H{"error": "internal server error"})
 | 
						|
		return
 | 
						|
	}
 | 
						|
 | 
						|
	c.JSON(http.StatusOK, instance)
 | 
						|
}
 |