MCPcopy Index your code
hub / github.com/Preloading/TwitterAPIBridge / DeleteToken

Function DeleteToken

db_controller/db_controller.go:317–326  ·  view source on GitHub ↗

DeleteToken deletes a token using did and uuid

(did string, tokenUUID string)

Source from the content-addressed store, hash-verified

315
316// DeleteToken deletes a token using did and uuid
317func DeleteToken(did string, tokenUUID string) error {
318 result := db.Where("user_did = ? AND token_uuid = ?", did, tokenUUID).Delete(&Token{})
319 if result.Error != nil {
320 return result.Error
321 }
322 if result.RowsAffected == 0 {
323 return fmt.Errorf("token not found")
324 }
325 return nil
326}
327
328// DeleteTokenViaBasic deletes a token using the username and password
329func DeleteTokenViaBasic(username string, password string) error {

Callers 1

GetAuthFromReqFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected