[VideoService] contradicting description about post video
Describe your question
In videoRecord.java it says:
/**
* The public time of this video, can be null
*/
private Timestamp publicTime;
Hence, I interpret this as the publicTime can be null and the video with null publicTime is visible once it is reviewed.
However, when benchmarking on videoService#postVideo, I get multiple wrong answers. And I find out that if I simply add a constraint to return null when publicTime is null, I can pass all testcases.
So the question is which description is correct: the one in videoRecord.java (can be null) or the result from benchmark (can't be null)?
follow the benchmark...I will edit the doc..
@WhatWEat
Thank you for your reply. But I have another question, in PostVideoReq.java it says:
/**
* The video's public time.
* <p>
* When posting a video, the owner can decide when to make it public.
* Before the public time, the video is only visible to the owner and superusers.
* <p>
* If the video is already published
* (when this DTO is used to {@link io.sustc.service.VideoService#updateVideoInfo(AuthInfo, String, PostVideoReq)}
* update a video), this field should be ignored.
*/
private Timestamp publicTime;
Does this ignore mean we should not update the publicTime?
Then in this case, can publicTime be null?
It seems that my answer is wrong if I do as above (if video is published, allow publicTime in PostVideoReq to be null and don't update current publicTime) when benchmarking.
That's also my mistakes in doc... But you might get the old version? I have edited the description of publicTime in PostVideoReq.java which means when posting or updating the video, you should provide a exact time(not null and after now()) to make the video public.
/**
* The video's public time.
* <p>
* When posting a video, the owner can decide when to make it public.
* Before the public time, the video is only visible to the owner and superusers.
* <p>
* This field can't be null.
*/
private Timestamp publicTime;
Thank you for your reply.