mirror of
https://github.com/fergalmoran/podnoms.git
synced 2025-12-22 09:18:08 +00:00
Added PodcastViewModel to entry VM
This commit is contained in:
@@ -28,6 +28,10 @@ export class SideOverlayComponent implements OnInit {
|
||||
if (r) {
|
||||
this.user$ = this._profileService.getProfile();
|
||||
this.entries$ = this._podcastService.getAllEntriesForUser();
|
||||
|
||||
this.entries$.subscribe((r) =>
|
||||
console.log('side-overlay.component', 'gotEntries', r)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
3
docker/letsencrypt.sh
Normal file → Executable file
3
docker/letsencrypt.sh
Normal file → Executable file
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
eval $(docker-machine env --unset)
|
||||
|
||||
read -n1 -p "Renew web? [y,n]" web
|
||||
if [[ $web == "Y" || $web == "y" ]]; then
|
||||
docker run -it --rm -p 443:443 -p 80:80 --name certbot \
|
||||
@@ -52,4 +54,5 @@ if [[ $jobs == "Y" || $jobs == "y" ]]; then
|
||||
-d jobs.podnoms.com \
|
||||
-m fergal.moran@gmail.com
|
||||
fi
|
||||
eval $(docker-machine env --unset)
|
||||
echo \n
|
||||
|
||||
@@ -17,6 +17,6 @@ namespace PodNoms.Api.Models.ViewModels {
|
||||
public bool Processed { get; set; }
|
||||
public string ProcessingPayload { get; set; }
|
||||
public int PodcastId { get; set; }
|
||||
// public PodcastViewModel Podcast { get; set; }
|
||||
public PodcastViewModel Podcast { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -28,19 +28,23 @@ namespace PodNoms.Api.Persistence {
|
||||
public async Task<IEnumerable<PodcastEntry>> GetAllForSlugAsync(string podcastSlug) {
|
||||
var entries = await GetAll()
|
||||
.Where(e => e.Podcast.Slug == podcastSlug)
|
||||
.Include(e => e.Podcast)
|
||||
.ToListAsync();
|
||||
return entries;
|
||||
}
|
||||
public async Task<IEnumerable<PodcastEntry>> GetAllForUserAsync(string userId) {
|
||||
var entries = await GetAll()
|
||||
.Where(e => e.Podcast.AppUser.Id == userId)
|
||||
.Include(e => e.Podcast)
|
||||
.ToListAsync();
|
||||
return entries;
|
||||
}
|
||||
|
||||
public async Task<PodcastEntry> GetByUidAsync(string uid) {
|
||||
var entry = await GetAll()
|
||||
.SingleOrDefaultAsync(e => e.NewId.ToString().Equals(uid));
|
||||
.Include(e => e.Podcast)
|
||||
.SingleOrDefaultAsync(e => e.NewId.ToString().Equals(uid))
|
||||
;
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace PodNoms.Api.Providers {
|
||||
.ForMember(
|
||||
src => src.PodcastId,
|
||||
e => e.MapFrom(m => m.Podcast.Id))
|
||||
.ForMember(
|
||||
src => src.Podcast,
|
||||
e => e.MapFrom(m => m.Podcast))
|
||||
.ForMember(
|
||||
src => src.Uid,
|
||||
e => e.MapFrom(m => m.ExposedUid));
|
||||
|
||||
Reference in New Issue
Block a user