Closed xy2009 closed 2 years ago
Thank you for your PR @xy2009 , the team will start to review it soon.
hello! I found that there was a bug in the last submission, and I submitted PR again after fixing. Tank you!
Thank you for your reply @xavierchow ,I have fixed the authorization bug.
Hello @xy2009 , I'm going to review the PR, but the code has compilation error when run npm start
, can you fix it.
Hello @MiffyLiye , Would you please send me the error message, I can fix it, I am currently running normally. it running like this:
@xy2009 I don't have a computer nearby so I cannot provide details, but it's about missing files in ignored folder configured in .gitignore.
Hello @MiffyLiye Whether it is the following similar error information: if it is because the mongodb configuration is wrong, the database configuration in config/default.json can be modified. it's wrong configuration:
change to right like this:
You can also refer to the .env.emaple configuration style file of the root directory to add your own local .env loaded the local configuration. My local .env configuration like this:
If this problem can be fixed through the above two operations.
I'm sorry for the configuration that has not been in detail in readme.md, which brings you a bad experience
got the following errors, @xy2009 besides the fix needed, is there a better way to get everybody set up with the same files?
~/workspace/recruitment/xy2009/test-backend/mongo-init leo_v1 ● yarn start
yarn run v1.22.17
$ npm run compile && node lib/
> koa-rest-admin@1.0.0 compile
> shx rm -rf lib/ && tsc
src/services/LoginLog.service.ts:3:25 - error TS2307: Cannot find module '../lib/BaseService' or its corresponding type declarations.
3 import BaseService from '../lib/BaseService';
~~~~~~~~~~~~~~~~~~~~
src/services/LoginLog.service.ts:101:41 - error TS2554: Expected 0 arguments, but got 3.
101 const serverUser = new ServerLoginLog(LoginLog, 'ServerLoginLog', getServiceMainUrl('serverLoginLog'));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/services/ServerUser.service.ts:3:25 - error TS2307: Cannot find module '../lib/BaseService' or its corresponding type declarations.
3 import BaseService from '../lib/BaseService';
~~~~~~~~~~~~~~~~~~~~
src/services/ServerUser.service.ts:4:32 - error TS2307: Cannot find module '../lib/types' or its corresponding type declarations.
4 import { Id, NullableId } from '../lib/types';
~~~~~~~~~~~~~~
src/services/ServerUser.service.ts:560:37 - error TS2554: Expected 0 arguments, but got 3.
560 const serverUser = new ServerUser(User, 'ServerUser', getServiceMainUrl('serverUser'));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 5 errors in 2 files.
Errors Files
2 src/services/LoginLog.service.ts:3
3 src/services/ServerUser.service.ts:3
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@xavierchow I'm very sorry, the git ignore the /src/lib
file,I have repaired, please check, thank you.
@xavierchow Hello! I have submitted the relevant functions of the expected implementation and submitted PR again, thank you.
code
in response body uses 401, 404, etc. that is not typical RESTful style, can you explain why you choose this API style?@MiffyLiye Hello! Sorry for the operation of the project to increase your trouble for you.
For the first question:
throw
method on the CTX before. It can be used it and change the customError
structure to solve the above problems. I will submit it again to repair this problem.For the second question: It is known that the report of the test case reports the error information due to some data needs to be initialized in advance, Three ways to think of:
test
function is processed by descibe
function according to the logic of the test case to ensure the correctness of the logic.@MiffyLiye I have fixed the above two bugs, please check. Thank you.
Thanks all, the PR is good enough for us to move forward.
@xy2009 I'm closing this PR, we will get back to you soon.
@xavierchow @MiffyLiye @bsdelf Thanks all, I'm glad to communicate with everyone.
hello!
I have implemented basic functions such as user creation and verification, log records, test conditions and documents, please check the Readme. I am interested in focusing on attention and nearby functions. At present, I submitted PR first. After other functions are completed, I will submit.
Tank you!