You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
350 B

4 years ago
package story
import (
"github.com/imdotdev/im.dev/server/pkg/log"
"github.com/imdotdev/im.dev/server/pkg/models"
)
var logger = log.RootLogger.New("logger", "story")
func Exist(id string) bool {
switch id[:1] {
4 years ago
case models.IDTypePost:
4 years ago
return postExist(id)
4 years ago
case models.IDTypeComment:
4 years ago
return commentExist(id)
default:
return false
}
}