@ -18,6 +18,7 @@ static bool handle_featured( struct http_request* req )
{
struct account * owner_account = account_from_id ( 0 ) ;
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;
# include "src/view/owner/featured.json.inc"
@ -34,6 +35,7 @@ static bool handle_followers( struct http_request* req )
if ( http_request_route_term ( req , " " ) ) {
struct ap_object * obj = account_ap_followers ( owner_account ) ;
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;
ap_object_write_to_FILE ( obj , f ) ;
@ -49,6 +51,7 @@ static bool handle_followers( struct http_request* req )
struct ap_object * obj = account_ap_followers_page ( owner_account , page ) ;
if ( ! obj ) { goto failed ; }
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;
ap_object_write_to_FILE ( obj , f ) ;
@ -75,6 +78,7 @@ static bool handle_following( struct http_request* req )
if ( http_request_route_term ( req , " " ) ) {
struct ap_object * obj = account_ap_following ( owner_account ) ;
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;
ap_object_write_to_FILE ( obj , f ) ;
@ -90,6 +94,7 @@ static bool handle_following( struct http_request* req )
struct ap_object * obj = account_ap_following_page ( owner_account , page ) ;
if ( ! obj ) { goto failed ; }
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;
ap_object_write_to_FILE ( obj , f ) ;
@ -113,6 +118,7 @@ static bool handle_owner_actor( struct http_request* req )
{
struct account * owner_account = account_from_id ( 0 ) ;
http_request_add_header ( req , " Access-Control-Allow-Origin " , " * " ) ;
http_request_send_headers ( req , 200 , " application/activity+json " , true ) ;
FILE * f = http_request_get_response_body ( req ) ;