Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mythz/pvq.app
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 22, 2024
2 parents 1c14a20 + d081adf commit 1bf2655
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package-lock.json
App_Data/
*.patch
Configure.Secrets.cs
.env

# User-specific files
*.suo
Expand Down
35 changes: 35 additions & 0 deletions MyApp.ServiceInterface/JobServices.cs
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;
}

0 comments on commit 1bf2655

Please sign in to comment.