Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .vs/PlatformApi/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file modified .vs/PlatformApi/v17/.suo
Binary file not shown.
2 changes: 2 additions & 0 deletions PlatformApi/Controllers/LoginVendeurController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public async Task<IActionResult> Login(VendeurRequestDto requestDto)
//generate token and add the id inside claims
var token = _jwtHelper.GenerateToken(vendeurVerfiy.id_Vendeur.ToString(),"user");

//if paid do vendeur // sinon user

return Ok(new {token});
}

Expand Down
10 changes: 10 additions & 0 deletions PlatformApi/Controllers/StoreController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,15 @@ public async Task<IActionResult> getStoreUrl(int id)
}
return Ok(st.urlstore);
}
[HttpGet("vendor/{id}")]
public async Task<IActionResult> getStoreUrlByVendor(int id)
{
Store st = await this._storeService.GetStoreUrlbyVendor(id);
if (st == null)
{
return NotFound();
}
return Ok(st.urlstore);
}
}
}
1 change: 1 addition & 0 deletions PlatformApi/Services/Contract/IStoreService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ public interface IStoreService
Task<bool> CreateStoreAsync(Store store);
bool IsLogoValid(string urlLogo);
Task<Store> GetStoreUrl(int id);
Task<Store> GetStoreUrlbyVendor(int idVendeur);
}
}
7 changes: 7 additions & 0 deletions PlatformApi/Services/Implementation/StoreService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,12 @@ public async Task<Store> GetStoreUrl(int id)
return await this._context.stores.FirstOrDefaultAsync(v => v.id_store == id);

}
public async Task<Store> GetStoreUrlbyVendor(int idVendeur)
{
return await this._context.stores.FirstOrDefaultAsync(v => v.VendeurId==idVendeur);

}


}
}
2 changes: 1 addition & 1 deletion PlatformApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Conn": "Data Source=localhost;Initial Catalog=platform;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true"
"Conn": "Data Source=.\\SQLEXPRESS;Initial Catalog=PlateformeDB;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Jwt": {
"Key": "YourSecretKeyForAuthenticationOfApplication",
Expand Down
Binary file modified PlatformApi/bin/Debug/net6.0/PlatformApi.dll
Binary file not shown.
Binary file modified PlatformApi/bin/Debug/net6.0/PlatformApi.exe
Binary file not shown.
Binary file modified PlatformApi/bin/Debug/net6.0/PlatformApi.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion PlatformApi/bin/Debug/net6.0/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Conn": "Data Source=localhost;Initial Catalog=platform;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true"
"Conn": "Data Source=.\\SQLEXPRESS;Initial Catalog=PlateformeDB;Integrated Security=True;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Jwt": {
"Key": "YourSecretKeyForAuthenticationOfApplication",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = PlatformApi
build_property.RootNamespace = PlatformApi
build_property.ProjectDir = D:\4th year\ASP.NET\PFA\platform\PlatformApi\
build_property.ProjectDir = D:\pfa\Nouveau dossier\asp-plateform\PlatformApi\
build_property.RazorLangVersion = 6.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = D:\4th year\ASP.NET\PFA\platform\PlatformApi
build_property.MSBuildProjectDirectory = D:\pfa\Nouveau dossier\asp-plateform\PlatformApi
build_property._RazorSourceGeneratorDebug =
Binary file modified PlatformApi/obj/Debug/net6.0/PlatformApi.assets.cache
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
00a12bda95a2e07a81991b2e2a6e1134a7d8a9a3
587b9ce14a89906309a06a0ee7b07b5a20d57b2f
Binary file modified PlatformApi/obj/Debug/net6.0/PlatformApi.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
52a408ec0a7dd2902e42517c8414cffbdbda8fcc
a758135538d851cbb9296c0c5c0b680ec58d4e90
Binary file modified PlatformApi/obj/Debug/net6.0/PlatformApi.pdb
Binary file not shown.
Binary file modified PlatformApi/obj/Debug/net6.0/apphost.exe
Binary file not shown.
Binary file modified PlatformApi/obj/Debug/net6.0/ref/PlatformApi.dll
Binary file not shown.
Binary file modified PlatformApi/obj/Debug/net6.0/refint/PlatformApi.dll
Binary file not shown.
16 changes: 8 additions & 8 deletions PlatformApi/obj/PlatformApi.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"format": 1,
"restore": {
"D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj": {}
"D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj": {}
},
"projects": {
"D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj": {
"D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj",
"projectUniqueName": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj",
"projectName": "PlatformApi",
"projectPath": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj",
"packagesPath": "C:\\Users\\HP\\.nuget\\packages\\",
"outputPath": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\obj\\",
"projectPath": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj",
"packagesPath": "C:\\Users\\ayoub\\.nuget\\packages\\",
"outputPath": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\HP\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Users\\ayoub\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
Expand Down Expand Up @@ -110,7 +110,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.401\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions PlatformApi/obj/PlatformApi.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\HP\.nuget\packages\</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\ayoub\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.7.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\HP\.nuget\packages\" />
<SourceRoot Include="C:\Users\ayoub\.nuget\packages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.6.1\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.6.1\build\Swashbuckle.AspNetCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore.design\6.0.0\build\net6.0\Microsoft.EntityFrameworkCore.Design.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore.design\6.0.0\build\net6.0\Microsoft.EntityFrameworkCore.Design.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\HP\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\HP\.nuget\packages\microsoft.entityframeworkcore.tools\6.0.0</PkgMicrosoft_EntityFrameworkCore_Tools>
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\ayoub\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
<PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\ayoub\.nuget\packages\microsoft.entityframeworkcore.tools\6.0.0</PkgMicrosoft_EntityFrameworkCore_Tools>
</PropertyGroup>
</Project>
14 changes: 7 additions & 7 deletions PlatformApi/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3689,19 +3689,19 @@
]
},
"packageFolders": {
"C:\\Users\\HP\\.nuget\\packages\\": {}
"C:\\Users\\ayoub\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj",
"projectUniqueName": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj",
"projectName": "PlatformApi",
"projectPath": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\PlatformApi.csproj",
"packagesPath": "C:\\Users\\HP\\.nuget\\packages\\",
"outputPath": "D:\\4th year\\ASP.NET\\PFA\\platform\\PlatformApi\\obj\\",
"projectPath": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\PlatformApi.csproj",
"packagesPath": "C:\\Users\\ayoub\\.nuget\\packages\\",
"outputPath": "D:\\pfa\\Nouveau dossier\\asp-plateform\\PlatformApi\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\HP\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Users\\ayoub\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
Expand Down Expand Up @@ -3797,7 +3797,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.401\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
}
}
}
Expand Down
Loading