초기커밋
This commit is contained in:
26
UGQApiServer/Converter/ConverterCommon.cs
Normal file
26
UGQApiServer/Converter/ConverterCommon.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using UGQDatabase.Models;
|
||||
|
||||
namespace UGQApiServer.Converter;
|
||||
|
||||
public static class ConverterCommon
|
||||
{
|
||||
public static List<string> buildLanguages(TextEntity titleText)
|
||||
{
|
||||
List<string> languages = new List<string>();
|
||||
|
||||
if (string.IsNullOrEmpty(titleText.En) == false)
|
||||
languages.Add("en");
|
||||
|
||||
if (string.IsNullOrEmpty(titleText.Kr) == false)
|
||||
languages.Add("kr");
|
||||
|
||||
if (string.IsNullOrEmpty(titleText.Jp) == false)
|
||||
languages.Add("jp");
|
||||
|
||||
if (languages.Count == 0)
|
||||
languages.Add("en");
|
||||
|
||||
return languages;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user