-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(submission): wip- legacy submission #8
Open
hamidre13
wants to merge
12
commits into
main
Choose a base branch
from
feature/plat-2251
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
64a946d
feat(submission): wip- legacy submission
hamidre13 93f01b0
fix: merge with upstream
hamidre13 58181c4
fix: move to domain-submission
hamidre13 81a6681
fix: wip testing
hamidre13 a368d79
feat: submission.update, reviewSummation
ThomasKranitsas b092001
fix: wip
d53d668
Merge branch 'feature/plat-2251' into feature/plat-2427
ThomasKranitsas 7a8f8c5
Merge pull request #12 from topcoder-platform/feature/plat-2427
ThomasKranitsas c848a1b
feat: wip
6607bec
feat:submission almost ready
3dad8fa
feat: submission wip
5f3783f
feat: submission create done for mm and regular
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,14 @@ | ||
import assert from "assert"; | ||
|
||
export const ENV = <string>process.env.ENV || "local"; | ||
export const TIME_ZONE = <string>process.env.TIME_ZONE || "America/New_York"; | ||
|
||
export const GRPC_SERVER_HOST = process.env.GRPC_SERVER_HOST || "localhost"; | ||
export const GRPC_SERVER_PORT = process.env.GRPC_SERVER_PORT || 9090; | ||
|
||
export const GRPC_RDB_SERVER_HOST = process.env.GRPC_RDB_SERVER_HOST; | ||
export const GRPC_RDB_SERVER_PORT = process.env.GRPC_RDB_SERVER_PORT; | ||
|
||
|
||
assert(GRPC_RDB_SERVER_HOST, "GRPC_RDB_SERVER_HOST is required"); | ||
assert(GRPC_RDB_SERVER_PORT, "GRPC_RDB_SERVER_PORT is required"); |
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,25 @@ | ||
import { QueryBuilder } from '@topcoder-framework/client-relational'; | ||
|
||
import { queryRunner } from '../helper/QueryRunner'; | ||
import { CreateResourceSubmissionInput } from '../models/domain-layer/legacy/resource_submission'; | ||
import { ResourceSubmissionSchema } from '../schema/resource/ResourceSubmission'; | ||
|
||
|
||
class LegacyResourceSubmissionDomain { | ||
public async create(input: CreateResourceSubmissionInput): Promise<boolean> { | ||
const query = new QueryBuilder(ResourceSubmissionSchema) | ||
.insert({ | ||
submission_id: input.submissionId, | ||
resource_id: input.resourceId, | ||
create_date: input.createDate as string, | ||
update_date: input.modifyDate as string, | ||
create_user: input.createUser as number, | ||
modify_user: input.modifyUser as number, | ||
}) | ||
.build(); | ||
await queryRunner.run(query); | ||
return true; | ||
} | ||
} | ||
|
||
export default new LegacyResourceSubmissionDomain(); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use dayjs - it's what we use in ACL generally