|
|
|
@ -12,6 +12,7 @@
|
|
|
|
|
|
|
|
|
|
// Submodules
|
|
|
|
|
#include "form.h"
|
|
|
|
|
#include "format.h"
|
|
|
|
|
#include "http/server/request.h"
|
|
|
|
|
|
|
|
|
|
// Platform Headers
|
|
|
|
@ -55,6 +56,11 @@ bool handle_admin_initial_owner_setup( struct http_request* req )
|
|
|
|
|
// Create owner account
|
|
|
|
|
struct account* owner = account_new();
|
|
|
|
|
owner->id = owner_account_id;
|
|
|
|
|
owner->server = strdup(g_server->domain);
|
|
|
|
|
owner->account_url = aformat("https://%s/owner/actor", g_server->domain );
|
|
|
|
|
owner->banner = aformat("https://%s/owner/banner.blob", g_server->domain );
|
|
|
|
|
owner->avatar.url = aformat("https://%s/owner/avatar.blob", g_server->domain );
|
|
|
|
|
owner->avatar.static_url = aformat("https://%s/owner/avatar.blob", g_server->domain );
|
|
|
|
|
account_save(owner);
|
|
|
|
|
|
|
|
|
|
// Create home timeline account
|
|
|
|
@ -89,6 +95,7 @@ bool handle_admin_initial_owner_setup( struct http_request* req )
|
|
|
|
|
confirm = strdup(form_pull_parser_read_value(fp));
|
|
|
|
|
} else if( 0 == strcmp(key,"handle") ) {
|
|
|
|
|
owner->handle = strdup(form_pull_parser_read_value(fp));
|
|
|
|
|
owner->display_name = strdup(owner->handle);
|
|
|
|
|
account_save(owner);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|