treebird/src/applications.c
nekobit ded0b83151 3rd clause
FossilOrigin-Name: 8766275cac121ced2142c9dee80f2c21a0337e9eb65501961807aba8fca0f252
2022-11-14 15:36:33 +00:00

25 lines
636 B
C

/*
* Treebird - Lightweight frontend for Pleroma
*
* Licensed under the BSD 3-Clause License
*/
#include "applications.h"
HV* perlify_application(const struct mstdnt_app* app)
{
if (!app) return NULL;
HV* app_hv = newHV();
hvstores_str(app_hv, "id", app->id);
hvstores_str(app_hv, "name", app->name);
hvstores_str(app_hv, "website", app->website);
hvstores_str(app_hv, "redirect_uri", app->redirect_uri);
hvstores_str(app_hv, "client_id", app->client_id);
hvstores_str(app_hv, "client_secret", app->client_secret);
hvstores_str(app_hv, "vapid_key", app->vapid_key);
return app_hv;
}