api/service-alias: refactor

This commit is contained in:
wukko 2024-09-01 15:35:49 +06:00
parent 740a75851e
commit 97fb6e60a2
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -1,10 +1,9 @@
const friendlyNames = {
bsky: "bluesky",
}
const friendlyKeys = Object.keys(friendlyNames);
export const friendlyServiceName = (service) => {
if (service in friendlyKeys) {
if (service in friendlyNames) {
return friendlyNames[service];
}
return service;