Initial commit

This commit is contained in:
oqtane
2019-05-04 20:32:08 -04:00
committed by Shaun Walker
parent 2f232eea7e
commit d71de1c21f
177 changed files with 8536 additions and 0 deletions

View File

@ -0,0 +1,25 @@
using System;
using Oqtane.Shared;
namespace Oqtane.Services
{
public class ServiceBase
{
public string CreateApiUrl(string absoluteUri, string serviceName)
{
Uri uri = new Uri(absoluteUri);
string apiurl = uri.Scheme + "://" + uri.Authority + "/";
string alias = Utilities.GetAlias(absoluteUri);
if (alias != "")
{
apiurl += alias;
}
else
{
apiurl += "~/";
}
apiurl += "api/" + serviceName;
return apiurl;
}
}
}