Reformatted switch.

This commit is contained in:
tastytea 2019-04-21 06:15:37 +02:00
parent c94a2ccb4a
commit 7558c73648
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 34 additions and 23 deletions

View File

@ -30,26 +30,37 @@ void API::get_stream(const Mastodon::API::v1 &call,
switch (call) switch (call)
{ {
case v1::streaming_user: case Mastodon::API::v1::streaming_user:
{
strcall = "/api/v1/streaming/user"; strcall = "/api/v1/streaming/user";
break; break;
}
case v1::streaming_public: case v1::streaming_public:
{
strcall = "/api/v1/streaming/public"; strcall = "/api/v1/streaming/public";
break; break;
}
case v1::streaming_public_local: case v1::streaming_public_local:
{
strcall = "/api/v1/streaming/public/local"; strcall = "/api/v1/streaming/public/local";
break; break;
}
case v1::streaming_hashtag: case v1::streaming_hashtag:
{
strcall = "/api/v1/streaming/hashtag"; strcall = "/api/v1/streaming/hashtag";
break; break;
}
case v1::streaming_list: case v1::streaming_list:
{
strcall = "/api/v1/streaming/list"; strcall = "/api/v1/streaming/list";
break; break;
}
default: default:
{
ttdebug << "ERROR: Invalid call.\n"; ttdebug << "ERROR: Invalid call.\n";
stream = "event: ERROR\ndata: {\"error_code\":22}\n"; stream = "event: ERROR\ndata: {\"error_code\":22}\n";
return; return;
break; }
} }
if (params.size() > 0) if (params.size() > 0)