generated from NetCoreTemplates/blazor-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/mythz/pvq.app
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ package-lock.json | |
App_Data/ | ||
*.patch | ||
Configure.Secrets.cs | ||
.env | ||
|
||
# User-specific files | ||
*.suo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using MyApp.Data; | ||
using MyApp.ServiceModel; | ||
using ServiceStack; | ||
using ServiceStack.OrmLite; | ||
|
||
namespace MyApp.ServiceInterface; | ||
|
||
public class JobServices(QuestionsProvider QuestionsProvider) : Service | ||
{ | ||
public async Task<object> Get(CheckPostJobs request) | ||
{ | ||
// Place holder for the actual implementation | ||
var post = Db.Single<Post>(x => x.Id == 105372); | ||
JobIdCount++; | ||
var questionFile = await QuestionsProvider.GetQuestionAsync(post.Id); | ||
var question = await questionFile.GetQuestionAsync(); | ||
|
||
var result = new List<PostJob> | ||
{ | ||
new PostJob | ||
{ | ||
JobId = JobIdCount, | ||
Body = question?.Post.Body, | ||
Tags = post.Tags, | ||
Title = post.Title, | ||
PostId = post.Id | ||
} | ||
}; | ||
|
||
return new CheckPostJobsResponse { Results = result }; | ||
} | ||
|
||
// For testing purposes | ||
public static int JobIdCount; | ||
} |