aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Configurations
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Web/Configurations')
-rw-r--r--src/DevHive.Web/Configurations/Extensions/ConfigureDependencyInjection.cs1
-rw-r--r--src/DevHive.Web/Configurations/Mapping/RatingMappings.cs16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/DevHive.Web/Configurations/Extensions/ConfigureDependencyInjection.cs b/src/DevHive.Web/Configurations/Extensions/ConfigureDependencyInjection.cs
index 5c0d378..88f21d4 100644
--- a/src/DevHive.Web/Configurations/Extensions/ConfigureDependencyInjection.cs
+++ b/src/DevHive.Web/Configurations/Extensions/ConfigureDependencyInjection.cs
@@ -32,6 +32,7 @@ namespace DevHive.Web.Configurations.Extensions
cloudName: configuration.GetSection("Cloud").GetSection("cloudName").Value,
apiKey: configuration.GetSection("Cloud").GetSection("apiKey").Value,
apiSecret: configuration.GetSection("Cloud").GetSection("apiSecret").Value));
+ services.AddTransient<IRateService, RateService>();
}
}
}
diff --git a/src/DevHive.Web/Configurations/Mapping/RatingMappings.cs b/src/DevHive.Web/Configurations/Mapping/RatingMappings.cs
new file mode 100644
index 0000000..4e071de
--- /dev/null
+++ b/src/DevHive.Web/Configurations/Mapping/RatingMappings.cs
@@ -0,0 +1,16 @@
+using AutoMapper;
+using DevHive.Services.Models.Post.Rating;
+using DevHive.Web.Models.Post.Rating;
+
+namespace DevHive.Web.Configurations.Mapping
+{
+ public class RatingMappings : Profile
+ {
+ public RatingMappings()
+ {
+ CreateMap<RatePostWebModel, RatePostServiceModel>();
+
+ CreateMap<ReadPostRatingServiceModel, ReadPostRatingWebModel>();
+ }
+ }
+}